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