Reproduction steps:
1. Open the “Coroutines“ project
2. Open the “SampleScene“ scene
3. In Scene view disable and enable 2D mode
Expected result: no errors in the Console
Actual result: a NullReferenceException in the Console
Reproduced in: 2020.3.42f1, 2021.3.14f1, 2022.1.23f1, 2022.2.0f1, 2023.1.0a21
Reproduced using: macOS Monterey 12.0.1 (Intel)
Full error:
NullReferenceException: Object reference not set to an instance of an object
Unity.EditorCoroutines.Editor.EditorCoroutine.ProcessIEnumeratorRecursive (System.Collections.IEnumerator enumerator) (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:126)
Unity.EditorCoroutines.Editor.EditorCoroutine.MoveNext () (at Library/PackageCache/com.unity.editorcoroutines@1.0.0/Editor/EditorCoroutine.cs:115)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:359)