Hi, I'm new to Dialogue System for Unity so I'm still learning how to use it.
I heard this tool is used in Disco Elysium. In that game when player's mouse cursor hover on a choice with dice rolls, additional information may display.
I'm wondering if it's possible to achieve this in DS? Or do I need additional scripting?
Displaying additional information for each choice
Re: Displaying additional information for each choice
Hi,
It may need a little bit of scripting depending on what information you want to display (e.g., pulling info from a separate skill system), but you can get a head start by examining the "Hover Response Button Example" scene on the Dialogue System Extras page.
It may need a little bit of scripting depending on what information you want to display (e.g., pulling info from a separate skill system), but you can get a head start by examining the "Hover Response Button Example" scene on the Dialogue System Extras page.
Re: Displaying additional information for each choice
Hi, I downloaded the demo but I can't figure out how to use it.
I opened the scene Hover Response Button Example in the package file but it doesn't have any tooltip information displayed.
The read me file says "Tooltip text component to your dialogue UI", but I can't find any "Tooltip text component". Is this a text component called "Tooltip"?
Any detailed tutorials would be appreciated.
I opened the scene Hover Response Button Example in the package file but it doesn't have any tooltip information displayed.
The read me file says "Tooltip text component to your dialogue UI", but I can't find any "Tooltip text component". Is this a text component called "Tooltip"?
Any detailed tutorials would be appreciated.
Re: Displaying additional information for each choice
Hi,
Does the included example scene work in your project? (Hover Response Button Example)
If so, then examine the scene's Customized Basic Standard Dialogue UI. The Response Menu Panel has a child GameObject named Tooltip Text. It's a GameObject with a regular UI Text component.
The Response Button Template has an Activate On Response Hover component (the script provided in this example package) and an Event Trigger component. The Event Trigger has UI events that call ActivateOnResponseHover.OnHover and OnUnhover.
The ActivateOnResponseHover script is custom-written for this example scene. It looks up two fields in the response's dialogue entry:
Does the included example scene work in your project? (Hover Response Button Example)
If so, then examine the scene's Customized Basic Standard Dialogue UI. The Response Menu Panel has a child GameObject named Tooltip Text. It's a GameObject with a regular UI Text component.
The Response Button Template has an Activate On Response Hover component (the script provided in this example package) and an Event Trigger component. The Event Trigger has UI events that call ActivateOnResponseHover.OnHover and OnUnhover.
The ActivateOnResponseHover script is custom-written for this example scene. It looks up two fields in the response's dialogue entry:
- Description: Shows the value of the Description field in the Tooltip Text GameObject.
- Activate On Hover: A custom-added field. Activates the GameObject named by this field.
Re: Displaying additional information for each choice
I think I found the problem....I edited Customized Basic Standard Dialogue UI in my project so my imported the package won't function properly. I opened a new clean project for the package import and the demo works now.Tony Li wrote: ↑Tue Dec 28, 2021 9:08 am Hi,
Does the included example scene work in your project? (Hover Response Button Example)
If so, then examine the scene's Customized Basic Standard Dialogue UI. The Response Menu Panel has a child GameObject named Tooltip Text. It's a GameObject with a regular UI Text component.
The Response Button Template has an Activate On Response Hover component (the script provided in this example package) and an Event Trigger component. The Event Trigger has UI events that call ActivateOnResponseHover.OnHover and OnUnhover.
The ActivateOnResponseHover script is custom-written for this example scene. It looks up two fields in the response's dialogue entry:
You can use the script as-is or use it as a starting point for your own functionality.
- Description: Shows the value of the Description field in the Tooltip Text GameObject.
- Activate On Hover: A custom-added field. Activates the GameObject named by this field.
Following the demo I got tooltip text working now.
By the way, are there anyway to activate a sprite window background that appear under the tooltip text when it's activated? Right now I had to use a static window background that always appears whenever the response menu appeared, similar to demo scene setup. But that window doesn't deactivate when tooltip text isn't on. So it looks kinda awkward.
Any advice would be great.
Re: Displaying additional information for each choice
Yes. You can edit the ActivateOnHoverResponse script to also activate & deactivate a background GameObject along with the tooltip text GameObject.Esylin wrote: ↑Tue Dec 28, 2021 11:57 amBy the way, are there anyway to activate a sprite window background that appear under the tooltip text when it's activated? Right now I had to use a static window background that always appears whenever the response menu appeared, similar to demo scene setup. But that window doesn't deactivate when tooltip text isn't on. So it looks kinda awkward.