示例#1
0
 void Awake()
 {
     if (s_Instance != null)
     {
         Destroy(this);
     }
     else
     {
         s_Instance = this;
         DontDestroyOnLoad(this);
     }
 }
示例#2
0
 void OnDestroy()
 {
     s_Instance = null;
 }