Why does returning from an AR scene make frame rate drop

I’ve noticed a notable performance drop when returning from the AR scene.

I’m wondering if there is any magic method I need to call to release all resources that the ar session occupied?

I’ve attached a video file that shows the problem

Notice the jitter of scrolling after returning from AR.

This only happened after ARFoundation scene. This project contains scenes with Wikitude AR plugin for marker and object tracking but coming back from those 2 scenes did not result in performance drop.

ARSession.matchFrameRate is the cause. When this setting is enabled, AR Foundation will execute this code:

Application.targetFrameRate = FPS_THAT_CURRENT_AR_PROVIDER_SUPPORTS;

Almost all Android devices support only 30 fps video in AR, so your target framerate will be set to 30.
To solve your issue, please either disable the matchFrameRate setting OR set the Application.targetFrameRate to the desired value after you exit the AR mode.

2 Likes

Thank you!