Example #1
0
 void Awake()
 {
     if(instance == null)
     {
         DontDestroyOnLoad(gameObject);
         instance = this;
         UpdatePanels(SplashPanel);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Example #2
0
        void Awake()
        {
            if(instance == null)
            {
                DontDestroyOnLoad(gameObject);
                instance = this;
                UpdatePanels(SplashPanel);
				ControllerManager manager = new ControllerManager();
            }
            else if (instance != this)
            {
                Destroy(gameObject);
            }
        }