0
Fixed

IgniterEventReceive.OnDestroy Null Reference Exception in Editor

GameUX 5 months ago in Game Creator updated by Marti (Lead Developer) 5 months ago 1

Line 27 of IgnitreEventREceive.cs is throwing a null reference exception when run in Unity Editor and the play button is stopped. Looks like a race condition where the manager is destroyed before the event can be destroyed.

Easy fix: wrap line 27 in an if (EventDispatchManager.Instance). 


Best practice: verify the instance exists before invoking something for it to do, handling the else if needed (in this case not).

Unity version:
2019.2.11f1
Game Creator version:
1.1.6
Fixed

Hi Richard! Yup, that's a bug we were aware of. The last Game Creator update (which is already available on the Asset Store) should solve this problem.

Just want to mention though that the problem has no negative impact and happens because we didn't have means to detect when the game was stopping from when an object was destroyed while the game is still running.

If after updating this issue still happens, feel free to reopen this thread and we'll take a closer look