Renderer.OnBecameVisible 用于舞台套件?
Renderer.OnBecameVisible for scenekit?
在 Unity 中,有一个事件 (Rendered.OnBecameVisible),您可以订阅它以了解对象(用 SceneKit 的说法,SCNNode)何时变得可见 "by any camera"。
Scenekit 是否有等效的 method/functionality/event subscription/or 任何远程相似的东西我可以用来实现相同的功能? (当SCNNode被摄像头"visible"时调用方法)
https://docs.unity3d.com/ScriptReference/Renderer.OnBecameVisible.html
没有您可以实施的委托方法,但是您的 SCNSceneRenderer
,通常是您的 SCNView
,有一个 isNode(_:insideFrustumOf:)
方法:
Use this method to test whether a node lies within the viewing frustum defined by another node (which may or may not be the scene renderer’s current pointOfView node). For example, in a game scene containing multiple camera nodes, you could use this method to determine which camera is currently best for viewing a moving player character.
在 Unity 中,有一个事件 (Rendered.OnBecameVisible),您可以订阅它以了解对象(用 SceneKit 的说法,SCNNode)何时变得可见 "by any camera"。
Scenekit 是否有等效的 method/functionality/event subscription/or 任何远程相似的东西我可以用来实现相同的功能? (当SCNNode被摄像头"visible"时调用方法)
https://docs.unity3d.com/ScriptReference/Renderer.OnBecameVisible.html
没有您可以实施的委托方法,但是您的 SCNSceneRenderer
,通常是您的 SCNView
,有一个 isNode(_:insideFrustumOf:)
方法:
Use this method to test whether a node lies within the viewing frustum defined by another node (which may or may not be the scene renderer’s current pointOfView node). For example, in a game scene containing multiple camera nodes, you could use this method to determine which camera is currently best for viewing a moving player character.