Page 1 of 1

Customizing sequence dialogue editor

Posted: Wed Mar 06, 2024 2:50 pm
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]?

Re: Customizing sequence dialogue editor

Posted: Wed Mar 06, 2024 3:45 pm
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)")});
}

Re: Customizing sequence dialogue editor

Posted: Thu Mar 07, 2024 4:05 pm
by paul2205
I would have preferred the dropdowns instead, but this could work as well. Thanks.

Re: Customizing sequence dialogue editor

Posted: Thu Mar 07, 2024 7:09 pm
by Tony Li
Glad to help!