using System; using UnityEngine; using UnityEngine.SceneManagement; using System.Collections; public class Logo : MonoBehaviour { #region public bool LoadComplete; #endregion private void Start() { StartCoroutine(Load()); } private IEnumerator Load() { AsyncOperation async = SceneManager.LoadSceneAsync(1); async.allowSceneActivation = false; while (!LoadComplete || Math.Abs(async.progress - 0.9f) > 0.0005f) { yield return null; } async.allowSceneActivation = true; } public void complete() { LoadComplete = true; } }