Unity error when I change scene:MissingReferenceException

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
rita0424
Posts: 5
Joined: Tue Nov 08, 2022 11:07 pm

Unity error when I change scene:MissingReferenceException

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

Re: Unity error when I change scene:MissingReferenceException

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