void OnDestroy() { if (IsTakeOver) { takeOverPosition_ = transform.position; takeOverRotation_ = transform.rotation; } else { #if DOWNLOADED_ARFOUNDATION LoaderUtility.Deinitialize(); LoaderUtility.Initialize(); #endif } }
private void Awake() { XRGeneralSettings.Instance.Manager.InitializeLoaderSync(); if (XRGeneralSettings.Instance.Manager.activeLoader == null) { Debug.LogError("Initializing XR Failed. Check Editor or Player log for details."); } else { XRGeneralSettings.Instance.Manager.StartSubsystems(); LoaderUtility.Initialize(); SceneManager.LoadScene("Lidar Feed", LoadSceneMode.Single); } }
public void LoadITSYScene(GameObject chosenEpisode) { session = GameObject.Find("AR Session"); if (session != null) { var sessionScript = session.GetComponent <ARSession>(); sessionScript.Reset(); } if (chosenEpisode != null) { episode = chosenEpisode; } LoaderUtility.Initialize(); SceneManager.LoadScene("ITSY", LoadSceneMode.Single); }
static void LoadScene(string sceneName) { LoaderUtility.Initialize(); SceneManager.LoadScene(sceneName, LoadSceneMode.Single); }
void OnSceneUnloaded(Scene current) { LoaderUtility.Deinitialize(); LoaderUtility.Initialize(); }
public void LoadMenu() { ARSelectScript.shownEpisode = true; LoaderUtility.Initialize(); SceneManager.LoadScene("Menu", LoadSceneMode.Single); }