Page 1 of 1

Dialogue Entry Popup in inspector with multiple conversations

Posted: Wed Oct 25, 2023 3:46 am
by Loremu
Hi,

I have some difficulties using the DialogueEntryPopup in one specific setting.

My Setup:
I have a ScriptableObject with following fields (note: I've only put the stuff here that's related to the dialogue system):

Code: Select all

[CreateAssetMenu(menuName = "ScriptableObjects/Memory")]
public class ScriptableMemory : ScriptableObject
{
    public DialogueDatabase dialogueDatabase;
    [ConversationPopup(false)]
    public string conversationName;
    [ActorPopup]
    public string mainCharacter;
    public ShortInfo[] shortInfos;
   }
ShortInfo is a serialized class that looks like this:

Code: Select all

[System.Serializable]
public class ShortInfo
{
    [ConversationPopup(false)]
    public string conversation;

    [DialogueEntryPopup]
    public int[] infoSnippetEntries;
}
My issue
When I try to select dialogue entries using the popup in "ShortInfo" it references conversationName (from "ScriptableMemory") and not conversation, even though the description in Visual Studio says that it uses the entries of the "most recent conversation selection shown in the inspector".

Your documentation on the DialogueEntryPopup Attribute says: "This attribute also does not support lists of serialized classes." I'm not completely certain what this sentence means - is it related to my issue?
Do you have a solution for what I'm trying to achieve (being able to select dialogue entries from different conversations in each item in the ShortInfos array)?

Any help is appreciated :)
Thank you!

Best
Lorena

Re: Dialogue Entry Popup in inspector with multiple conversations

Posted: Wed Oct 25, 2023 8:09 am
by Tony Li
Hi Lorena,

The [DialogueEntryPopup] attribute doesn't support lists or arrays. So you can do this:

Code: Select all

[DialogueEntryPopup] public int infoSnippetEntry;
But you can't do this:

Code: Select all

[DialogueEntryPopup] public int[] infoSnippetEntries;

Re: Dialogue Entry Popup in inspector with multiple conversations

Posted: Thu Nov 02, 2023 7:08 am
by Loremu
Hi Toni,

alright, thank you!

Re: Dialogue Entry Popup in inspector with multiple conversations

Posted: Thu Nov 02, 2023 8:16 am
by Tony Li
Glad to help!