Page 1 of 1

Customize Node Style in Editor

Posted: Sat Sep 11, 2021 6:20 pm
by Sapidus3
I could not find anything like this in the forum, apologies if I have missed it.

Is there a way that I can have the dialogue entry nodes take on customized appearances in the editor? Ideally, I would like it if there was a way to add icons to the node such as when adding sequences or scripts to the node.

Just for context, I have created an enum field for different alignment choices that I have added to the node template. When I set the enum for a dialogue response, it will then display a tag in the response menu, and when that option is selected it will automatically make the necessary changes to the alignment (I was thrilled with how straightforward that all was once I found relevant forum posts).

I would like to be able to see at a glance which responses I have set that field for in the editor.

If the answer is "no," that's fine, but I might suggest that as a future feature.

Thanks!

Re: Customize Node Style in Editor

Posted: Sat Sep 11, 2021 9:28 pm
by Tony Li
Hi,

Assign a method to DialogueEditorWindow.customNodeMenuSetup as described in Customizing the Dialogue Editor. (That link also includes an example script.)

When you write "Ideally, I would like it if there was a way to add icons to the node such as when adding sequences or scripts to the node," I assume those sequence, script, and conditions icons currently show up. If not, make sure you haven't moved the Editor Default Resources folder. It's a special folder whose name is mandated by Unity; it shouldn't be changed.

Re: Customize Node Style in Editor

Posted: Sun Sep 12, 2021 9:30 am
by Sapidus3
Thanks, that looks exactly like what I need! Missed that in the documentation.

Yeah, the icons are currently showing up which is what made me think it would be nice to have them for my own purposes as well.

Thanks for the fast response.

Re: Customize Node Style in Editor

Posted: Sun Sep 12, 2021 9:50 am
by Tony Li
Happy to help!