示例#1
0
 public static T GetInstance()
 {
     if (instance == null)
     {
         instance = PersistentUObjectHelper.CreateComponent <T>();
     }
     return(instance);
 }
示例#2
0
 void Awake()
 {
     PersistentUObjectHelper.AddGameObject(gameObject);
     Destroy(this);
 }