Esempio n. 1
0
 public void Awake()
 {
     if (_instance != null)
     {
         Destroy(this);
         return;
     }
     _instance = this;
 }
Esempio n. 2
0
        public void OnDestroy()
        {
            config.SetValue("mainWindowRect", mainWindowRect);
            config.SetValue("defaultSkinName", defaultSkinName);
            config.save();

            if (_instance == this)
            {
                _instance = null;
            }

            GameEvents.onGUIApplicationLauncherReady.Remove(OnAppLauncherReady);
            GameEvents.onGameSceneSwitchRequested.Remove(OnSwitchRequested);
        }