Hi,
I'm trying to use the ECS System class, and noticing on hardware, that update() is not being called every frame as its described in the Simulator, or as described in the documentation.
To reproduce, simply create a System like so:
class MySystem : System {
var count : Int = 0
required init(scene: Scene) {
}
func update(context: SceneUpdateContext) {
count = count + 1
print("Update \(count)")
}
}
Then, inside the RealityView, register the System with:
MySystem.registerSystem()
Notice that while it'll reliably be called every frame in Simulator, it'll run for a few seconds on hardware, freeze, then only be called when indirectly doing something like moving a window or performing other visionOS actions that are analogous to those that call "invalidate" to refresh a window in other operating systems.
Thanks in advance,
-Rob.