Set CALayer as SCNMaterial's diffuse contents

后端 未结 2 1599
执笔经年
执笔经年 2021-02-08 17:15

I\'ve been searching all over the internet over the past couple of days to no avail. Unfortunately, the apple documentation about this specific issue is vague and no sample code

2条回答
  •  醉梦人生
    2021-02-08 17:42

    The SceneKit docs pretty strongly suggest that, while there are cases where you can use animated CALayers as material content, that doesn't include UIView layers:

    SceneKit cannot use a layer that is already being displayed elsewhere (for example, the backing layer of a UIView object).

    That suggests that if you want to make animated content for your material, you're better off with either Core Animation used entirely on its own or SpriteKit.

提交回复
热议问题