Page 1 of 1

Unity error when I change scene:MissingReferenceException

Posted: Wed Dec 07, 2022 7:19 am
by rita0424
HI
When I start conversation and change sceneA to sceneB . At sceneB the conversation will play on start.
At that time , It has a error :MissingReferenceException: The object of type 'Dialogue system trigger' has been destroyed but you are still trying to access it.Your script should either check if it is null or you should not destroy the object.

But if I play sceneB independently, there are no error show in unity.
How can I solve it?
thanks

Re: Unity error when I change scene:MissingReferenceException

Posted: Wed Dec 07, 2022 9:24 am
by Tony Li
Hi,

Please click on that error in the Console window, press Ctrl+C to copy its details to the clipboard, then paste it into a reply.

If you're starting a new conversation when sceneB starts, make sure to end sceneA's conversation. If you require the player to click the continue button to advance conversations, you can use the Continue() sequencer command on the last node to simulate a continue button click and end the conversation. Or you can use the StopConversation() sequencer command.