ARSession - How to reset it

Hello,

I been trying to reset the ARSession as stated here -
https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@1.0/api/UnityEngine.XR.ARFoundation.ARSession.html
But the Reset function is just not available, i tired multiple ideas but i just can’t seem to call this function.

how do i reset the ARsession?

Thanks

You’re probably trying to call it like this ARSession.Reset(). But Reset is an instance method so you need a reference to an instance of ARSession.
The easiest way to get a reference is to pass it via Inspector. Here is a quick example:

using UnityEngine;
using UnityEngine.XR.ARFoundation;


public class ARSessionResetExample: MonoBehaviour {
    [SerializeField] ARSession arSession; // assign this field via Inspector

  
    void Update() {
        bool needReset = false; // replace with your own code
        if (needReset) {
            arSession.Reset();
        }
    }
}