Beispiel #1
0
 private void Awake()
 {
     if (instance == null)
     {
         DontDestroyOnLoad(this);
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     dialougeManager = DialougeManagerV2.instance;
     player          = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>();
     mainCamera      = Camera.main;
 }