Automate replacement of names in scripts

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Espes
Posts: 24
Joined: Sun Aug 16, 2020 12:29 pm

Automate replacement of names in scripts

Post by Espes »

Hello. I ve mentioned in the past that when I change the name of a conversation, actor, quest etc, I have to change manually every reference from the dropdown in every related script.
Isnt there a way to automate this?
Is that a limitation of Unity editor?
Is there a workaround?

Thank you.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Automate replacement of names in scripts

Post by Tony Li »

It's not a limitation of the Unity editor. It's a design decision and limitation of the Dialogue System. The Dialogue System can import and export to text-based formats. To support this, many of the dropdowns are also text-based. It's not ideal in Unity, but it's necessary to be able to support import and export to all the formats it supports.

If you rename a variable, you can use the Renamer Tool.

For actors and quests, I recommend leaving the Name field unchanged. Instead, change the Display Name field.

Remember also that you can use the Dialogue Editor's Database panel > Global Search & Replace to rename things within in the dialogue database, although this doesn't rename dropdowns in your scenes. If it's a major issue, the Renamer Tool is written to be able to subclass so you can add functionality to rename other things, not just variables, in databases and scenes. The roadmap has a task to rename actors, quests, and conversation titles in Dialogue System Triggers and Dialogue Actors.
Espes
Posts: 24
Joined: Sun Aug 16, 2020 12:29 pm

Re: Automate replacement of names in scripts

Post by Espes »

I understand the reason behind it. Glad to hear that there is a solution and future upgrade.
Post Reply