Hi everyone
I was thinking of developing a mobile application that uses AR, so I decided to use unity.
But major part of the app is just like simple native apps and not requires any 3d rendering and that stuff.
I have wondered is there a way to limit unity to render a frame just on touch or when an event happens?
Simply instead of rendering 30 FPS for example, It renders the UI when it’s needed just like regular applications.
You can lower the frame rate but that will also lower the interval in which input is processed, meaning if you want to raise the frame rate again, there’ll be a delay before you’ll process the input.
Starting with Unity 2019.3, you can use OnDemandRendering, which was created for this. It allows you to continue updating Unity and input at a higher frame rate but skip rendering for some frames. This way, you can quickly ramp the frame rate back up as soon as you detect input. This is rather low-level and requires you to implement the details, I don’t think there’s anything that you can just drop in your project.
Alternatively, there’s also Unity as a Library, which allows you to embed Unity into an app. So you can make the UI natively and switch into Unity for AR. You can combine native UI and Unity but it’s not very straightforward.
Thanks for your informative answer