I have checked the code several times and mine is exactly as the instructor’s code, but when I go from scene 1 to scene 2 no issues. However, when I go back to scene 1 from scene 2, I receive two errors as follow:
The first error only occurs if I am in the canopy when transitioning from scene 2 to scene 1.
Coroutine couldn’t be started because the game object ‘Canopy’ is inactive!
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
TransparentDetection:OnTriggerExit2D (UnityEngine.Collider2D) (at Assets/Scripts/Misc/TransparentDetection.cs:47)
NullReferenceException: Object reference not set to an instance of an object
PlayerController.OnDisable () (at Assets/Scripts/Player/PlayerController.cs:48)
UnityEngine.Object:Destroy(Object)
Singleton`1:Awake() (at Assets/Scripts/Scene Management/Singleton.cs:14)
PlayerController:Awake() (at Assets/Scripts/Player/PlayerController.cs:26)