Announcements, support questions, and discussion for the Dialogue System.
Aephrosi
Posts: 4 Joined: Fri Nov 08, 2024 9:35 pm
Post
by Aephrosi » Fri Nov 08, 2024 10:01 pm
Whenever I load (currently with SaveSystemMethods) I am getting:
Code: Select all
MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
On public references that are visible in the inspector. This only seems to happen on functions that are called through Lua.RegisterFunction.
SaveBroken.png (67.69 KiB) Viewed 49 times
If I do a:
Code: Select all
player = GameObject.Find("Player")
before trying to use it, everything proceeds just fine. Problem is, I have many other game objects that need to maintain that reference.
Thanks in advance.
Aephrosi
Posts: 4 Joined: Fri Nov 08, 2024 9:35 pm
Post
by Aephrosi » Fri Nov 08, 2024 10:23 pm
Can confirm that it looks like it has to do with running it straight through the Lua.RegisterFunction call.
If I instead have the dialogue system enable an separate object with a Usable trigger, I can go to that object to trigger the code with the usable.
Aephrosi
Posts: 4 Joined: Fri Nov 08, 2024 9:35 pm
Post
by Aephrosi » Sun Nov 10, 2024 12:29 am
Great! thank you. I'll stay with my work-around for now, but if I end up needing this, it's good to have as a reference.