Customize Node Style in Editor

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Sapidus3
Posts: 6
Joined: Fri Sep 10, 2021 2:31 pm

Customize Node Style in Editor

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

Re: Customize Node Style in Editor

Post 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.
Sapidus3
Posts: 6
Joined: Fri Sep 10, 2021 2:31 pm

Re: Customize Node Style in Editor

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

Re: Customize Node Style in Editor

Post by Tony Li »

Happy to help!
Post Reply