Tony Li wrote: ↑Thu May 02, 2024 3:33 pm
Yes. Move your Caption Text where it's not inside your dialogue UI. It must still be in a Canvas, though, since that's a requirement for Text or TextMeshProUGUI components. But if it's in the dialogue UI it will only be visible while the dialogue UI is open (i.e., while a conversation is active).
Hmmmm weird....
My quest text is an object that exists independently, it is not part of dialogue UI. The quest text did not disppear if the dialogue UI is close, it changes the quest entry name into 'nil' text when the dialogue UI is closed. It feels like the component can not get the quest entry name string anymore if the conversation is inactive.
I can test this again with clean project later, to see if it is something interferring the text.
Ah, you might need to add a check to the OnQuestStateChange(string questName) method. I updated the method in my previous post (but not in the example scene).
Update: I think the problem is solved now, than you! I used the scripts in a clean project and it worked perfectly fine, so it is not the problem with the script.
It turns out that a playmaker component is interfering with the text component, I deleted that playmaker component and it worked.