Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Performance issue when starting ARsession

Discussion in 'AR' started by danUnity, Apr 29, 2021.

  1. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    Hello!

    I'm getting a huge spike over 15 frames every time I start/enable the ARsession component.

    In the screenshot, you can see the spike and it's caused by the ARSession.Update() function (its taking 66ms)

    Is there a way to avoid that spike? To start the ARsession async?

    upload_2021-4-29_17-0-40.png
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,795
    Some insight from the team:

    On Android, starting a session is a synchronous and expensive operation.
     
    danUnity likes this.
  3. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    229
    Definitely what I'm experiencing! Is there a way to get a callback when the session has started? Or to start the session async?

    Thanks