// Start is called before the first frame update void Start() { var fader = ScreenFader.Instance; fader.FadeTo(Color.black, 10f); ExperienceApp.End(); }
public static IVRDevice CreateDevice(ExperienceApp experienceApp = null) { // TODO Add an environment SDK Configuration. #if UNITY_XR return(CreateDevice(ESDKType.UnityXR)); #else return(CreateDevice(Application.platform == RuntimePlatform.Android ? ESDKType.OVR : ESDKType.OpenVR)); #endif }
// Start is called before the first frame update void Start() { Debug.Log("Is running"); var fader = ScreenFader.Instance; fader.FadeTo(Color.black, 10f); ExperienceApp.End(); Debug.Log("Is running"); }
private IEnumerator EndOfGame() { ScreenFader.Instance.FadeTo(Color.black, duration: 1); yield return(ScreenFader.Instance.WaitUntilFadeComplete()); Debug.Log("End"); ExperienceApp.End(); Application.Quit(); }
private IEnumerator Outro() { ScreenFader.Instance.FadeToBlack(13); yield return(ScreenFader.Instance.WaitUntilFadeComplete()); yield return(new WaitForSeconds(2)); ExperienceApp.End(); }
private static void ClearAppData(ExperienceApp app) { if (app == null) { return; } var so = new SerializedObject(app); so.FindProperty("m_AppData").objectReferenceValue = null; so.FindProperty("m_AssetLookup").objectReferenceValue = null; so.FindProperty("m_RootGameObjects").ClearArray(); so.FindProperty("m_RootGameObjects").arraySize = 0; so.ApplyModifiedProperties(); }
public IEnumerator Unload(ExperienceApp app) { SerializationUtils.ClearGlobalSerializableTypes(); if (app != null) { var scene = app.gameObject.scene; if (scene.isLoaded) { yield return(SceneManager.UnloadSceneAsync(scene)); } yield return(Resources.UnloadUnusedAssets()); } }
// Update is called once per frame void FixedUpdate() { if (TimeTracker < (TotalDuration + fadeDuration)) { TimeTracker += Time.deltaTime; if (TimeTracker > TotalDuration) { callFader = true; Fader(); } } else { ExperienceApp.End(); } //slider.value = TimeTracker / TotalDuration; }
private static void VerifyAppSceneSetup(ExperienceApp app) { if (app == null) { throw new Exception("No ExperienceApp found in scene." + "Please ensure your scene is setup correctly. " + " Run Liminal -> Setup App Scene to prepare your scene for build." ); } if (app.gameObject.GetComponentInChildren <VRAvatar>() == null) { throw new Exception( "No active VRAvatar component was found inside the ExperienceApp. " + " A VRAvatar is required for compatibility with the Liminal application. " + " Please ensure your scene is setup correctly. Run Liminal -> Setup App Scene to prepare your scene for build." ); } }
/// <summary> /// End will only close the application when you're within the platform /// </summary> public void End() { StartCoroutine(routine()); IEnumerator routine() { var elapsedTime = 0f; var startingVolume = AudioListener.volume; ScreenFader.Instance.FadeToBlack(FadeOutTime); while (elapsedTime < FadeOutTime) { elapsedTime += Time.deltaTime; AudioListener.volume = Mathf.Lerp(startingVolume, 0f, elapsedTime / FadeOutTime); yield return(new WaitForEndOfFrame()); } ExperienceApp.End(); } }
private static void SetAppData(ExperienceApp app, TextAsset jsonData, AssetLookup assetLookup) { if (app == null) { return; } var so = new SerializedObject(app); so.FindProperty("m_AppData").objectReferenceValue = jsonData; so.FindProperty("m_AssetLookup").objectReferenceValue = assetLookup; var rootObjects = app.gameObject.scene.GetRootGameObjects(); var pRootObjects = so.FindProperty("m_RootGameObjects"); for (int i = 0; i < rootObjects.Length; ++i) { pRootObjects.InsertArrayElementAtIndex(i); pRootObjects.GetArrayElementAtIndex(i).objectReferenceValue = rootObjects[i]; } so.ApplyModifiedProperties(); }
public void EndTheApp() { ExperienceApp.End(); }
public void QuitGame() { ExperienceApp.End(); }
protected override void EnactSpringActions() { ExperienceApp.End(); }