Exemplo n.º 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         Initialize();
         LoadSettingData();
         LoadSaveData();
     }
     else if (instance != this)
     {
         instance.Initialize();
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
 }