Dialogue Entry Popup in inspector with multiple conversations

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Loremu
Posts: 20
Joined: Wed Dec 29, 2021 11:06 am

Dialogue Entry Popup in inspector with multiple conversations

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

Re: Dialogue Entry Popup in inspector with multiple conversations

Post 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;
Loremu
Posts: 20
Joined: Wed Dec 29, 2021 11:06 am

Re: Dialogue Entry Popup in inspector with multiple conversations

Post by Loremu »

Hi Toni,

alright, thank you!
User avatar
Tony Li
Posts: 22108
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue Entry Popup in inspector with multiple conversations

Post by Tony Li »

Glad to help!
Post Reply