void OnTriggerEnter2D(Collider2D collider) { OverworldCharacter charScript = collider.gameObject.GetComponent <OverworldCharacter>(); if (charScript != null) { SceneManager.LoadScene(sceneToStart); } }
private void Awake() { if (isMainCharacter) { if (MainCharacter != null) { throw new Exception("Multiple main characters detected"); } MainCharacter = this; } _humanoidAnimator = GetComponent <HumanoidAnimator>(); StartCoroutine(_Test()); }