Customizing sequence dialogue editor

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
paul2205
Posts: 7
Joined: Mon Feb 19, 2024 11:47 am

Customizing sequence dialogue editor

Post by paul2205 »

I want to customize the sequence in the dialogue editor to make it easier for non-tech people to create sequences.
I want to have dropdowns to select the animations and actors.

[Picture edit 1] I have created a function that does just that and called it in the DrawLayout and it works just fine, but I would like to not change the code from the asset and do this change externally.

I found out there is a way to do it, in here: https://pixelcrushers.com/dialogue_syst ... mizeEditor

[Picture edit 2] I used "DialogueEditorWindow.customDrawDialogueEntryInspector += AddToEntryInspector;", but this way it adds my changes to the bottom.

How can I make it add them in the sequence container like in the [Picture edit 1]?
Attachments
Screenshot 2024-03-06 214033.png
Screenshot 2024-03-06 214033.png (26.39 KiB) Viewed 148 times
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Customizing sequence dialogue editor

Post by Tony Li »

Hi,

That event hook always draws after the main section.

What if you hook your code into SequenceEditorTools.customSequenceMenuSetup(GenericMenu) instead? You could add menu items like:

Code: Select all

SequenceEditorTools.customSequenceMenuSetup += AddItemsToSequenceMenu;
...
private static void AddItemsToSequenceMenu(GenericMenu menu)
{
    menu.AddItem(new GUIContent("Animation/Idle/speaker"), false, () => { SequenceEditorTools.AddText("AnimatorPlay(Idle,speaker)")});
}
paul2205
Posts: 7
Joined: Mon Feb 19, 2024 11:47 am

Re: Customizing sequence dialogue editor

Post by paul2205 »

I would have preferred the dropdowns instead, but this could work as well. Thanks.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Customizing sequence dialogue editor

Post by Tony Li »

Glad to help!
Post Reply