void Awake()
    {
        s_instance = this;
        DontDestroyOnLoad(gameObject);
        DontDestroyOnLoad(this);

        //Another hard code
        SetCurrentScene(m_mainMenuScene);
    }
Exemplo n.º 2
0
 private void SetUpSingleton()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
Exemplo n.º 3
0
 void Awake()
 {
     s_instance = this;
     DontDestroyOnLoad(gameObject);
     DontDestroyOnLoad(this);
 }