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