These scripts are not functioning. The DoUpdateMission in MissionUpdateDispatcher function is not getting called, even when it’s been assigned a listener.
Considering the scripts you attached above:
- the properties invokeOnDestroy and invokeOnEnable are always false… and therefore your event is not going to be invoked because there is an ‘if’ statement checking if they are true before deciding to fire the events.
- nobody is calling OnDestroy() and OnEnable()
Unless of course you are doing this in other scripts that you did not attach.
invokeOnDestroy and invokeOnEnable are public variables set in the inspector manually by me. And OnDestroy() and OnEnable() are events Unity calls when the script is destroyed and enabled, respectively.
Prior to adding the if check, Unity would complain about DoUpdateMission() being null, even though assigning it a listener should’ve given it a legit value. Perhaps an expert should assist on this…