protected virtual void Start()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
         this.gameObject.name = gameObject.name + " Instance";
     }
     else
     {
         Destroy(this.gameObject);
         return;
     }
 }
Пример #2
0
 protected virtual void Start()
 {
     character = GetComponent <ThirdPersonController>();
     CharacterInit();
 }