Hi,
We have dialogue where we would like the player to be able to select a response option by clicking a custom button element - for example two team logos representing choices for teams the players can join. Is this possible?
Selecting a response through a custom button
Re: Selecting a response through a custom button
Yes. The easiest way is to use TextMesh Pro (see TMPro Support) and <sprite> tags in your response dialogue entries' menu text to show team logo images inline with your text.
However, if you want differently-styled buttons than your regular dialogue UI, create a separate response menu panel in your dialogue UI, or a separate dialogue UI entirely. (See Dialogue UI Tutorial if you need details.) In either case, set up your two team logo buttons and assign them to the StandardUIMenuPanel's Buttons list, making a note of the element number of each one (i.e., 0 and 1). To assign the first response to use button 0, include the markup tag [position=0] in the menu text. Use [position=1] in the second response's menu text.
If you've set up an additional menu panel in the same dialogue UI, make sure to add it to the StandardDialogueUI component's Conversation UI Elements > Menu Panels list. To tell the dialogue UI to use your custom menu panel, use the SetMenuPanel() sequencer command or a Dialogue Actor component on one of the participants whose Dialogue UI Settings > Menu Panel Number is set to the menu panel number in the Menu Panels list.
However, if you want differently-styled buttons than your regular dialogue UI, create a separate response menu panel in your dialogue UI, or a separate dialogue UI entirely. (See Dialogue UI Tutorial if you need details.) In either case, set up your two team logo buttons and assign them to the StandardUIMenuPanel's Buttons list, making a note of the element number of each one (i.e., 0 and 1). To assign the first response to use button 0, include the markup tag [position=0] in the menu text. Use [position=1] in the second response's menu text.
If you've set up an additional menu panel in the same dialogue UI, make sure to add it to the StandardDialogueUI component's Conversation UI Elements > Menu Panels list. To tell the dialogue UI to use your custom menu panel, use the SetMenuPanel() sequencer command or a Dialogue Actor component on one of the participants whose Dialogue UI Settings > Menu Panel Number is set to the menu panel number in the Menu Panels list.
Re: Selecting a response through a custom button
Ok, thanks! I'll give it a go!
Re: Selecting a response through a custom button
Sounds good! If you have any questions about it, let me know.