Different Conversation UI
Re: Different Conversation UI
This is great! Slightly different than what I was thinking. It's something new to think about. Any suggestions for a "Reply" option?
Re: Different Conversation UI
You could set up a Reply button as a design-time response button -- that is, it would be assigned to the dialogue UI's Buttons list rather than instantiated at runtime using the response button template. This response could use the TextInput() sequencer command to prompt the user for text input. If you'd like to see an example, please let me know.
If you don't want the player to enter a response as freeform text, you could link the Reply button to some pre-written responses that the player can choose from.
If you don't want the player to enter a response as freeform text, you could link the Reply button to some pre-written responses that the player can choose from.
Re: Different Conversation UI
My plan is the latter, using predefined text.
Re: Different Conversation UI
Sounds good. That's easier, too. I wasn't quite sure what you'd do with the freeform text if you went that way.
Re: Different Conversation UI
Just I'm understanding this correctly. You are suggesting that there is a UI button that exists outside of the Dialogue System. When the player clicks this button, it displays text that exists outside of the system as well. Is this correct?Tony Li wrote:You could set up a Reply button as a design-time response button -- that is, it would be assigned to the dialogue UI's Buttons list rather than instantiated at runtime using the response button template.
Re: Different Conversation UI
I was actually suggesting a button that still exists inside the Dialogue System. You can configure the Unity UI Dialogue UI component with two types of response buttons:
1. A "template" response button (Button Template). The Dialogue System makes copies of this template to show responses and puts them inside a Button Template Holder. These are the buttons you're familiar with in the email conversation example I posted earlier.
2. Or "hard-coded" buttons that you position and customize at design time (i.e., not automatically at runtime). These buttons are assigned to the Buttons list on the Unity UI Dialogue UI component. Here's an example of one purpose of these "hard-coded" buttons:
In that screenshot from The Walking Dead, there are four hard-coded buttons. Each one also has an image as a child UI element that indicates which gamepad button works as the shortcut. You can see that each button is positioned and formatted specially; they aren't just instantiated copies thrown into a vertical list. (There's also a timer bar below the button, which you can also do with the Dialogue System, but that's beside the point.)
Here's an example scene ("Email With Reply") that adds a Reply button.
EmailConversationExample_2016-10-11.unitypackage
The conversation has a new dialogue entry node whose Dialogue Text is "Reply [position 0]". The special tag "[position 0]" tells it to use the hard-coded button in position 0, which is the button shown in red below:
I also used the TextInput() sequencer command to get freeform text input from the player, but you could just as easily have the conversation lead to a menu of prewritten replies.
1. A "template" response button (Button Template). The Dialogue System makes copies of this template to show responses and puts them inside a Button Template Holder. These are the buttons you're familiar with in the email conversation example I posted earlier.
2. Or "hard-coded" buttons that you position and customize at design time (i.e., not automatically at runtime). These buttons are assigned to the Buttons list on the Unity UI Dialogue UI component. Here's an example of one purpose of these "hard-coded" buttons:
In that screenshot from The Walking Dead, there are four hard-coded buttons. Each one also has an image as a child UI element that indicates which gamepad button works as the shortcut. You can see that each button is positioned and formatted specially; they aren't just instantiated copies thrown into a vertical list. (There's also a timer bar below the button, which you can also do with the Dialogue System, but that's beside the point.)
Here's an example scene ("Email With Reply") that adds a Reply button.
EmailConversationExample_2016-10-11.unitypackage
The conversation has a new dialogue entry node whose Dialogue Text is "Reply [position 0]". The special tag "[position 0]" tells it to use the hard-coded button in position 0, which is the button shown in red below:
I also used the TextInput() sequencer command to get freeform text input from the player, but you could just as easily have the conversation lead to a menu of prewritten replies.
Re: Different Conversation UI
That's awesome! Alright, a couple more questions.
- Is there a way to hide the Reply option in the Inbox list when it is available as a button?
- Is button setup/functionality in the documentation? I can find the Continue button but not the predefined Response buttons.
Re: Different Conversation UI
There are a couple ways to do this. One way is to simply deactivate the button. To test this in the example scene, I changed the Reply node's Sequence to:nrvllrgrs wrote:Is there a way to hide the Reply option in the Inbox list when it is available as a button?
Code: Select all
SetActive(REPLY RESPONSE BUTTON,false);
TextInput(Text Field UI, REPLY:, ReplyContent)
In a sense. The documentation assumes that you're using predefined response buttons, and includes an extra section on how to use a button template. This is because early versions of the Dialogue System only used predefined response buttons. However, the button template approach has proven to be more popular, so that's what most of the prefab dialogue UIs ship with, including the generic UI bundled in the Dialogue Manager prefab. The setup for predefined buttons is pretty simple:nrvllrgrs wrote:Is button setup/functionality in the documentation? I can find the Continue button but not the predefined Response buttons.
1. Add a button to the response panel.
2. Add a Unity UI Response Button component to the button.
3. Add the button to the dialogue UI's Buttons list.
Re: Different Conversation UI
This code snippet does not disable Response Button Template (Clone) gameObject for the "Reply" option. I added that code to the Sequence property to the "Reply [position 0]" node in the example. This creates 2 paths for players to reply, which is somewhat awkward. Am I doing something wrong?SetActive(REPLY RESPONSE BUTTON,false);
Re: Different Conversation UI
Can you rename the button to get rid of "(Clone)"? Currently the sequencer doesn't accept gameObject names that contain parentheses. (This is documented in the manual but not prominent.) I plan to remove this restriction in a future version.