DialogueManager losing reference to Canvas and UI across Scenes
Posted: Wed Jul 17, 2024 8:49 pm
Hello!
I've been trying to sort things out with a recent issue I've been dealing with.
The gist is, my game's current Manager breaks when you go into different scenes, due to the Manager losing access to the Canvas and the DialogueUI upon scene transition, despite the DialogueManager itself being a proper Instance.
This confuses me since I've tried both making the DialogueUI a Prefab, or an instance, but both yield the same error "MissingReferenceException: The object of type 'StandardDialogueUI' 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." when I try playing conversations in different scenes. At first I thought this was because I had other DialogueManagers in each scene for debugging purposes, but now that I've gotten rid of some of it, the same issue continues to happen.
What can I do to fix this? I don't think there's anything that would destroy the DialogueUI's references, barring some kind of odd instancing issue?
I've been trying to sort things out with a recent issue I've been dealing with.
The gist is, my game's current Manager breaks when you go into different scenes, due to the Manager losing access to the Canvas and the DialogueUI upon scene transition, despite the DialogueManager itself being a proper Instance.
This confuses me since I've tried both making the DialogueUI a Prefab, or an instance, but both yield the same error "MissingReferenceException: The object of type 'StandardDialogueUI' 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." when I try playing conversations in different scenes. At first I thought this was because I had other DialogueManagers in each scene for debugging purposes, but now that I've gotten rid of some of it, the same issue continues to happen.
What can I do to fix this? I don't think there's anything that would destroy the DialogueUI's references, barring some kind of odd instancing issue?