Closed moheydy closed 2 years ago
Can you provide a recording of the behavior?
A possible workaround would be to deinitialize your active loader (see the StopXR
method in the code-block) during the Application.unloading callback manually.
Tanks I fixed this by manually calling StartXR function in Awake and StopXR before Unload
private void Awake()
{
Application.unloading += OnUnload;
FindObjectOfType<ManualXRControl>().StartXR();
}
static void OnUnload()
{
Debug.Log("Unloading the Player");
FindObjectOfType<ManualXRControl>().StopXR();
}
Just don't forget to remove tick Initialize XR on startup in PlayerSetting (This function doesn't work correctly after first unload even if you call StopXR() )
I build a Ar application, Everything is good but when I use Applications.Unload() ( I want in future embedded my app in a android studio Applications ) and back again in App , Ar camera have a lag and leak for about 10 second and many times for always until Quite of App (even in empty Ar app i have this issue)