예제 #1
0
 /// <summary>
 /// Adds the listener for loading finished.
 /// </summary>
 /// <remarks>
 /// Ensures that the object will be reactivated if without a loading system active,
 /// for example when playing the level in the editor out of sequence.
 /// </remarks>
 private void Awake()
 {
     if (LoadingTransitionController.Exists())
     {
         gameObject.SetActive(false);
     }
     LoadingTransitionController.OnLoadingFinished += ActivateGameObject;
 }
예제 #2
0
 /// <summary>
 /// Handles if there is no transition controller.
 /// </summary>
 private void Start()
 {
     if (!LoadingTransitionController.Exists())
     {
         // no transition controller so disable updating.
         enabled = false;
     }
 }