Exemplo n.º 1
0
 private static UnityObject LoadScene(Scene scene)
 {
     // This is removed here. It is called in scene.Initialize just below.
     scene.Initialize(false);
     Application.LoadNewAssets(true);
     if (scene.prefabs.Count > 0)
     {
         UnityObject.DontDestroyOnLoad(scene.prefabs[0]);
         return(scene.prefabs[0]);
     }
     return(null);
 }
Exemplo n.º 2
0
        private void SceneLoadComplete()
        {
#if DEBUG
            Debug.Log("******************************** Scene Load Complete ***********************************");
#endif
            stopWatch.Stop();
            stopWatch.Reset();

            isLoadingAssetBeforeSceneInitialize = false;
            isLoadingAdditive = false;
            isLoadingLevel    = false;

#if DEBUG
            Debug.Log("******************************** Scene Initialize begin ***********************************");
#endif
            if (scene != null)
            {
                scene.Initialize(true);
                scene = null;
            }
#if DEBUG
            Debug.Log("******************************** Scene Initialize end ***********************************");
#endif
        }