IEnumerator Start() { Debug.Log("Showing splash screen"); SplashScreen.Begin(); while (!SplashScreen.isFinished) { SplashScreen.Draw(); yield return(null); } Debug.Log("Finished showing splash screen"); }
private IEnumerator GotoFirstPanel() { SplashScreen.Begin(); firstPanel.SetActive(true); loadingPanel.SetActive(true); while (!SplashScreen.isFinished) { SplashScreen.Draw(); yield return(null); } loadingPanel.SetActive(false); }
private void Awake() { if (Application.isEditor) { if (_simulateInEditor) { SplashScreen.Begin(); } } _eventSystem = FindObjectOfType <EventSystem>(); _eventSystem.enabled = false; }
protected IEnumerator Start() { _unityLogoAudioSource.Play(); _gameLogoAudioSource.PlayDelayed(2.45f); SplashScreen.Begin(); while (!SplashScreen.isFinished) { SplashScreen.Draw(); yield return(null); } SceneManager.LoadScene("PrepareUI"); }
public static int Begin_s(IntPtr l) { int result; try { SplashScreen.Begin(); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
private void BuiltinCustomSplashScreenGUI() { EditorGUILayout.LabelField(k_Texts.splashTitle, EditorStyles.boldLabel); using (new EditorGUI.DisabledScope(!licenseAllowsDisabling)) { EditorGUILayout.PropertyField(m_ShowUnitySplashScreen, k_Texts.showSplash); if (!m_ShowUnitySplashScreen.boolValue) { return; } } GUIContent buttonLabel = SplashScreen.isFinished ? k_Texts.previewSplash : k_Texts.cancelPreviewSplash; Rect previewButtonRect = GUILayoutUtility.GetRect(buttonLabel, "button"); previewButtonRect = EditorGUI.PrefixLabel(previewButtonRect, new GUIContent(" ")); if (GUI.Button(previewButtonRect, buttonLabel)) { if (SplashScreen.isFinished) { SplashScreen.Begin(); PlayModeView.RepaintAll(); var playModeView = PlayModeView.GetMainPlayModeView(); if (playModeView) { playModeView.Focus(); } EditorApplication.update += PollSplashState; } else { SplashScreen.Stop(SplashScreen.StopBehavior.StopImmediate); EditorApplication.update -= PollSplashState; } GameView.RepaintAll(); } EditorGUILayout.PropertyField(m_SplashScreenLogoStyle, k_Texts.splashStyle); // Animation EditorGUILayout.PropertyField(m_SplashScreenAnimation, k_Texts.animate); m_ShowAnimationControlsAnimator.target = m_SplashScreenAnimation.intValue == (int)PlayerSettings.SplashScreen.AnimationMode.Custom; if (EditorGUILayout.BeginFadeGroup(m_ShowAnimationControlsAnimator.faded)) { EditorGUI.indentLevel++; EditorGUILayout.Slider(m_SplashScreenLogoAnimationZoom, 0.0f, 1.0f, k_Texts.logoZoom); EditorGUILayout.Slider(m_SplashScreenBackgroundAnimationZoom, 0.0f, 1.0f, k_Texts.backgroundZoom); EditorGUI.indentLevel--; } EditorGUILayout.EndFadeGroup(); EditorGUILayout.Space(); // Logos EditorGUILayout.LabelField(k_Texts.logosTitle, EditorStyles.boldLabel); using (new EditorGUI.DisabledScope(!Application.HasProLicense())) { EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(m_ShowUnitySplashLogo, k_Texts.showLogo); if (EditorGUI.EndChangeCheck()) { if (!m_ShowUnitySplashLogo.boolValue) { RemoveUnityLogoFromLogosList(); } else if (m_SplashScreenDrawMode.intValue == (int)PlayerSettings.SplashScreen.DrawMode.AllSequential) { AddUnityLogoToLogosList(); } } m_ShowLogoControlsAnimator.target = m_ShowUnitySplashLogo.boolValue; } if (EditorGUILayout.BeginFadeGroup(m_ShowLogoControlsAnimator.faded)) { EditorGUI.BeginChangeCheck(); var oldDrawmode = m_SplashScreenDrawMode.intValue; EditorGUILayout.PropertyField(m_SplashScreenDrawMode, k_Texts.drawMode); if (oldDrawmode != m_SplashScreenDrawMode.intValue) { if (m_SplashScreenDrawMode.intValue == (int)PlayerSettings.SplashScreen.DrawMode.UnityLogoBelow) { RemoveUnityLogoFromLogosList(); } else { AddUnityLogoToLogosList(); } } } EditorGUILayout.EndFadeGroup(); using (var vertical = new EditorGUILayout.VerticalScope()) using (new EditorGUI.PropertyScope(vertical.rect, GUIContent.none, m_SplashScreenLogos)) { m_LogoList.DoLayoutList(); } EditorGUILayout.Space(); // Background EditorGUILayout.LabelField(k_Texts.backgroundTitle, EditorStyles.boldLabel); EditorGUILayout.Slider(m_SplashScreenOverlayOpacity, Application.HasProLicense() ? k_MinProEditionOverlayOpacity : k_MinPersonalEditionOverlayOpacity, 1.0f, k_Texts.overlayOpacity); m_ShowBackgroundColorAnimator.target = m_SplashScreenBackgroundLandscape.objectReferenceValue == null; if (EditorGUILayout.BeginFadeGroup(m_ShowBackgroundColorAnimator.faded)) { EditorGUILayout.PropertyField(m_SplashScreenBackgroundColor, k_Texts.backgroundColor); } EditorGUILayout.EndFadeGroup(); EditorGUILayout.PropertyField(m_SplashScreenBlurBackground, k_Texts.blurBackground); EditorGUI.BeginChangeCheck(); ObjectReferencePropertyField <Sprite>(m_SplashScreenBackgroundLandscape, k_Texts.backgroundImage); if (EditorGUI.EndChangeCheck() && m_SplashScreenBackgroundLandscape.objectReferenceValue == null) { m_SplashScreenBackgroundPortrait.objectReferenceValue = null; } using (new EditorGUI.DisabledScope(m_SplashScreenBackgroundLandscape.objectReferenceValue == null)) { ObjectReferencePropertyField <Sprite>(m_SplashScreenBackgroundPortrait, k_Texts.backgroundPortraitImage); } }
private void BuiltinCustomSplashScreenGUI() { EditorGUILayout.LabelField(PlayerSettingsSplashScreenEditor.k_Texts.splashTitle, EditorStyles.boldLabel, new GUILayoutOption[0]); using (new EditorGUI.DisabledScope(!PlayerSettingsSplashScreenEditor.licenseAllowsDisabling)) { EditorGUILayout.PropertyField(this.m_ShowUnitySplashScreen, PlayerSettingsSplashScreenEditor.k_Texts.showSplash, new GUILayoutOption[0]); if (!this.m_ShowUnitySplashScreen.boolValue) { return; } } Rect rect = GUILayoutUtility.GetRect(PlayerSettingsSplashScreenEditor.k_Texts.previewSplash, "button"); rect = EditorGUI.PrefixLabel(rect, new GUIContent(" ")); if (GUI.Button(rect, PlayerSettingsSplashScreenEditor.k_Texts.previewSplash)) { SplashScreen.Begin(); GameView mainGameView = GameView.GetMainGameView(); if (mainGameView) { mainGameView.Focus(); } GameView.RepaintAll(); } EditorGUILayout.PropertyField(this.m_SplashScreenLogoStyle, PlayerSettingsSplashScreenEditor.k_Texts.splashStyle, new GUILayoutOption[0]); EditorGUILayout.PropertyField(this.m_SplashScreenAnimation, PlayerSettingsSplashScreenEditor.k_Texts.animate, new GUILayoutOption[0]); this.m_ShowAnimationControlsAnimator.target = (this.m_SplashScreenAnimation.intValue == 2); if (EditorGUILayout.BeginFadeGroup(this.m_ShowAnimationControlsAnimator.faded)) { EditorGUI.indentLevel++; EditorGUILayout.Slider(this.m_SplashScreenLogoAnimationZoom, 0f, 1f, PlayerSettingsSplashScreenEditor.k_Texts.logoZoom, new GUILayoutOption[0]); EditorGUILayout.Slider(this.m_SplashScreenBackgroundAnimationZoom, 0f, 1f, PlayerSettingsSplashScreenEditor.k_Texts.backgroundZoom, new GUILayoutOption[0]); EditorGUI.indentLevel--; } EditorGUILayout.EndFadeGroup(); EditorGUILayout.Space(); EditorGUILayout.LabelField(PlayerSettingsSplashScreenEditor.k_Texts.logosTitle, EditorStyles.boldLabel, new GUILayoutOption[0]); using (new EditorGUI.DisabledScope(!Application.HasProLicense())) { EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(this.m_ShowUnitySplashLogo, PlayerSettingsSplashScreenEditor.k_Texts.showLogo, new GUILayoutOption[0]); if (EditorGUI.EndChangeCheck()) { if (!this.m_ShowUnitySplashLogo.boolValue) { this.RemoveUnityLogoFromLogosList(); } else if (this.m_SplashScreenDrawMode.intValue == 1) { this.AddUnityLogoToLogosList(); } } this.m_ShowLogoControlsAnimator.target = this.m_ShowUnitySplashLogo.boolValue; } if (EditorGUILayout.BeginFadeGroup(this.m_ShowLogoControlsAnimator.faded)) { EditorGUI.indentLevel++; EditorGUI.BeginChangeCheck(); int intValue = this.m_SplashScreenDrawMode.intValue; EditorGUILayout.PropertyField(this.m_SplashScreenDrawMode, PlayerSettingsSplashScreenEditor.k_Texts.drawMode, new GUILayoutOption[0]); if (intValue != this.m_SplashScreenDrawMode.intValue) { if (this.m_SplashScreenDrawMode.intValue == 0) { this.RemoveUnityLogoFromLogosList(); } else { this.AddUnityLogoToLogosList(); } } EditorGUI.indentLevel--; } EditorGUILayout.EndFadeGroup(); this.m_LogoList.DoLayoutList(); EditorGUILayout.Space(); EditorGUILayout.LabelField(PlayerSettingsSplashScreenEditor.k_Texts.backgroundTitle, EditorStyles.boldLabel, new GUILayoutOption[0]); EditorGUILayout.Slider(this.m_SplashScreenOverlayOpacity, (!Application.HasProLicense()) ? PlayerSettingsSplashScreenEditor.k_MinPersonalEditionOverlayOpacity : PlayerSettingsSplashScreenEditor.k_MinProEditionOverlayOpacity, 1f, PlayerSettingsSplashScreenEditor.k_Texts.overlayOpacity, new GUILayoutOption[0]); this.m_ShowBackgroundColorAnimator.target = (this.m_SplashScreenBackgroundLandscape.objectReferenceValue == null); if (EditorGUILayout.BeginFadeGroup(this.m_ShowBackgroundColorAnimator.faded)) { EditorGUILayout.PropertyField(this.m_SplashScreenBackgroundColor, PlayerSettingsSplashScreenEditor.k_Texts.backgroundColor, new GUILayoutOption[0]); } EditorGUILayout.EndFadeGroup(); PlayerSettingsSplashScreenEditor.ObjectReferencePropertyField <Sprite>(this.m_SplashScreenBackgroundLandscape, PlayerSettingsSplashScreenEditor.k_Texts.backgroundImage); if (GUI.changed && this.m_SplashScreenBackgroundLandscape.objectReferenceValue == null) { this.m_SplashScreenBackgroundPortrait.objectReferenceValue = null; } using (new EditorGUI.DisabledScope(this.m_SplashScreenBackgroundLandscape.objectReferenceValue == null)) { PlayerSettingsSplashScreenEditor.ObjectReferencePropertyField <Sprite>(this.m_SplashScreenBackgroundPortrait, PlayerSettingsSplashScreenEditor.k_Texts.backgroundPortraitImage); } }