Hi!
I'm trying to change the dialogue UI in runtime and I can't figure out how to do it by myself.
For context, the game I'm building has the default conversations with NPC's and a dialogue battle. Once the dialogue battle starts I would like to change the UI, and once it ends, change it back to the default UI for conversations.
I hope it's clear and thanks in advance!
How to change Dialogue UI in runtime
Re: How to change Dialogue UI in runtime
Hi,
The easiest way is use a unique GameObject for the battle conversation's conversant -- for example, maybe a GameObject named BattleManager that's a child of the Dialogue Manager GameObject. Add an Override Dialogue UI component to this GameObject, and assign your battle UI. Conversations that involve this GameObject will use the battle UI instead of your default UI.
Alternatively, you can call DialogueManager.SetDialogueUI() in C# before starting the conversation.
The easiest way is use a unique GameObject for the battle conversation's conversant -- for example, maybe a GameObject named BattleManager that's a child of the Dialogue Manager GameObject. Add an Override Dialogue UI component to this GameObject, and assign your battle UI. Conversations that involve this GameObject will use the battle UI instead of your default UI.
Alternatively, you can call DialogueManager.SetDialogueUI() in C# before starting the conversation.
Re: How to change Dialogue UI in runtime
Thanks Tony! Surely it seems to be easier than I thought. I'll try it, thanks again.
Re: How to change Dialogue UI in runtime
Happy to help!