Page 1 of 1

SendMessageSystem Lua function getting disabled when DontDestroyOnLoad and AllowOnlyOneInstance are enabled

Posted: Wed Jul 22, 2020 5:51 pm
by jlhacode
DontDestroyOnLoad and AllowOnlyOneInstance are enabled on my DialogueSystemController, and my CommonLibraryLua script is on the same prefab as my DialogueSystemController.

The order that the CommonLibraryLua OnEnable/OnDisable functions get called leaves the three SendMessage Lua functions disabled. I'm not sure how to go about fixing it.

OnEnable is called after the scene load
Screen Shot 2020-07-22 at 2.46.18 PM.png
Screen Shot 2020-07-22 at 2.46.18 PM.png (31.64 KiB) Viewed 473 times


OnDisable is called in Awake, which is eventually called after OnEnable
Screen Shot 2020-07-22 at 2.46.29 PM.png
Screen Shot 2020-07-22 at 2.46.29 PM.png (51.9 KiB) Viewed 473 times

Re: SendMessageSystem Lua function getting disabled when DontDestroyOnLoad and AllowOnlyOneInstance are enabled

Posted: Wed Jul 22, 2020 8:33 pm
by Tony Li
Hi,

Sorry, that slipped through the cracks. This patch should fix it:

DS_CommonLibraryLuaPatch_2020-07-22.unitypackage

It will also be in version 2.2.9.