Page 1 of 1

Automate replacement of names in scripts

Posted: Sun Dec 13, 2020 3:30 am
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.

Re: Automate replacement of names in scripts

Posted: Sun Dec 13, 2020 9:09 am
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.

Re: Automate replacement of names in scripts

Posted: Sun Dec 13, 2020 10:26 am
by Espes
I understand the reason behind it. Glad to hear that there is a solution and future upgrade.