Ejemplo n.º 1
0
 void Awake()
 {
     SceneManager.sceneLoaded += OnSceneLoaded;
     if (StartChecker.instance == null)
     {
         StartChecker.instance = this;
         DontDestroyOnLoad(this);
     }
     else
     {
         if (StartChecker.instance != this)
         {
             Destroy(gameObject);
         }
     }
 }