Forum Discussion
PointyLlama5273
9 months agoExplorer
Run every frame vs. every tick?
Is there a way to run a method in an activity once every frame instead of every tick? I'm aware that Systems exist, but they seem to be tied to the activity tick rate. Side note, my system also s...
Bulkywallnut
6 months agoMeta Employee
Thanks for the question!
Meta Spatial SDK only allows executions per tick. This can be done via Systems or AppSystemActivity.onSceneTick().
The tick rate adjusts automatically to system performance.
You can debug the performance of your Spatial SDK app with the Perfetto tool within Meta Quest Developer Hub.
1. First, enable Spatial SDK specific tracing in the main AppSystemActivity.onCreate()
onCreate() {
TraceUtils.forceEnabled = true
...
}
2. Launch your app. (Optionally, wait until tick rate is lowered to 45 ticks per second).
3. In Meta Quest Developer Hub, connect your Quest device. The "Device Manager" view contains a "Device Actions" block with a "Trace Analysis by Perfetto" Record button. Clicking the record button will generate a report after a couple of seconds. Searching "doFrame" in this view will navigate to Spatial SDK app calls, and is a good debugging point for performance issues.
If the issue cannot be solved by improving app code, may I ask your use case? Depending on what you are trying to implement there could be work around solutions.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 29 days ago
- 10 months ago