Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

ARFoundation reset Session double cycle?

Discussion in 'Handheld AR' started by Mephesto_Khaan, Oct 9, 2019.

  1. Mephesto_Khaan


    Jun 2, 2013
    Hi all,

    Since there is no proper way to remove trackables I need to reset the ARSession, which I do simply with:

    Code (CSharp):
    1. Debug.Log("Reseting session");
    2. session.Reset();
    But I am also logging the status of the session with

    Code (CSharp):
    1. private void ARSession_stateChanged(ARSessionStateChangedEventArgs obj)
    2.         {
    3.             Debug.Log($"ARSession <b>{obj.state.ToString()}</b>");
    4.         }

    And I am getting

    Code (CSharp):
    1. Reseting session
    2. ARSession SessionInitializing
    3. ARSession SessionTracking
    4. ARSession SessionInitializing
    5. ARSession SessionTracking
    How comes that one reset is triggering 2? Something off internally?

    Edit: this is ARkit latest 3.0.0 preview. Sorry I did not archive it properly!