Hello,
I have a game scene already built using Unity's Animator that shows dialogs on separate game objects and I am trying to transform it to work with DSU instead.
The first part of the game uses screen canvas, so I was able to adapt the DSU standard UI to it and I have a dialog tree that follows along.
However, the second part involves clicking on body parts of a character for a fight scene, and these body parts use world canvas. Each body part has a separate world canvas object and they trigger the related states.
My question is "How can I add an event to the body part world canvas buttons that will trigger a specific node in a conversation?". In other words, when I click on the "Head" button in the world canvas, I want it to continue the dialog in the same conversation from the "Head" node. I tried to add the DialogManager as a button event and use one of its method, and I can use StartConversation() method to start a new conversation, but I cannot set a variable.
Thank you for your help.
World Canvas and Triggering Nodes Using Button Events
Re: World Canvas and Triggering Nodes Using Button Events
Hi,
Add Dialogue System Trigger component to your Button GameObject. Configure the Button's OnClick() to call DialogueSystemTrigger.OnUse:
Add Dialogue System Trigger component to your Button GameObject. Configure the Button's OnClick() to call DialogueSystemTrigger.OnUse:
Re: World Canvas and Triggering Nodes Using Button Events
That worked. Thank you so much Tony.