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