Change dialogue canvas in script

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ORCONECTESLIMOSUS
Posts: 11
Joined: Sun Jan 19, 2025 11:26 am

Change dialogue canvas in script

Post by ORCONECTESLIMOSUS »

Ey
I have multiple worldspace UIs.
Dialogue is triggered with a C# script, and I'm looking for a way to change the UI in the script itself, possibly by assigning the right UI for each interactable thing in the inspector. How do i achieve this? :))))))
User avatar
Tony Li
Posts: 23252
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change dialogue canvas in script

Post by Tony Li »

Hi,

Here are some ways:
  • Assign the dialogue U to the interactable thing's Dialogue System Trigger component > Actions > Start Conversation > Override Dialogue UI
  • Or add an Override Dialogue UI component to the thing and assign the dialogue UI to it
  • Or use the default dialogue UI (e.g., Basic Standard Dialogue UI) but tell this thing to use a custom subtitle panel, as in How To: Show Overhead Conversation Bubble Text
Some other options that probably aren't what you're looking for: call the C# method DialogueManager.UseDialogueUI() or, to change dialogue UIs mid-conversation, assign a dialogue UI to DialogueManager.conversationModel.dialogueUI.
ORCONECTESLIMOSUS
Posts: 11
Joined: Sun Jan 19, 2025 11:26 am

Re: Change dialogue canvas in script

Post by ORCONECTESLIMOSUS »

Sorry, i didn't specify: the dialogue is triggered within a C# script with

DialogueManager.StartConversation(ConversationName);

,not with a dialogue system trigger component
User avatar
Tony Li
Posts: 23252
Joined: Thu Jul 18, 2013 1:27 pm

Re: Change dialogue canvas in script

Post by Tony Li »

That's fine. All of the same ideas still apply. For the first one, you can specify the override dialogue UI in DialogueManager.StartConversation().
Post Reply