SendMessageSystem Lua function getting disabled when DontDestroyOnLoad and AllowOnlyOneInstance are enabled

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jlhacode
Posts: 77
Joined: Fri Jul 03, 2020 6:23 am

SendMessageSystem Lua function getting disabled when DontDestroyOnLoad and AllowOnlyOneInstance are enabled

Post 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 470 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 470 times
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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.
Post Reply