immersivecognition / unity-experiment-framework

UXF - Framework for creating human behaviour experiments in Unity
https://immersivecognition.github.io/unity-experiment-framework/
MIT License
215 stars 41 forks source link

Inconsistent nullreferenceexception #93

Closed schko closed 2 years ago

schko commented 2 years ago

When entering play mode, I sometimes get the following error, is there a quick fix for this or could I be setting up the UI incorrectly in my scene?

Version: 2020.3.23

NullReferenceException: Object reference not set to an instance of an object UXF.UI.UIController+<TryBeginSessionFromUISequence>d__43.MoveNext () (at Assets/UXF/Scripts/UI/UIController.cs:275) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <f98083cbc97e4fa0a4ef2f523feff5e1>:0) UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator) UXF.UI.UIController:TryBeginSessionFromUI() (at Assets/UXF/Scripts/UI/UIController.cs:214) UnityEngine.EventSystems.EventSystem:Update() (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:385)

jackbrookes commented 2 years ago

I haven't been able to replicate this, I will do some more investigating