void MakeInstance()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
示例#2
0
 void MakeSingleton()
 {
     // if (instance != null) {
     //     Destroy(this);
     // }
     // else {
     instance = this;
     // DontDestroyOnLoad(this);
     // }
 }