Page 1 of 1

Trouble using ConversationPopup Attribute

Posted: Mon May 13, 2024 12:22 pm
by EffieArtoria
Hi. I'm having a little trouble. I have this field in my custom class:

Code: Select all

        [ConversationPopup(false, true)]
        public string conversation = string.Empty;
When I look at it in editor, if I've already looked at an object with a Dialogue System Trigger, then it behaves as expected, I get a little dropdown menu that lets me pick the conversation I want. However, if I'm looking at my game object with my custom script after Unity has reloaded script assemblies, it will look like an ordinary string field (with the filter, and an unchecked radio button). I can look at the Trigger again to get it to work, but I don't know what exactly is going wrong. Is there something I need to initialise inside of my object?

Thank you for your time

Re: Trouble using ConversationPopup Attribute

Posted: Mon May 13, 2024 2:41 pm
by Tony Li
Try [ConversationPopup(true)]. This will provide a dialogue database field that you can assign to populate the dropdown. The [ConversationPopup] attribute is just an editor convenience. It doesn't store any data with your component, such as which database you've assigned, so in certain cases you may need to assign the database again: if the open scene doesn't have a Dialogue Manager, or if you've most recently used a conversation popup field with a different database.