Hello Pixel Crushers!
I discovered the Unity Dialogue System asset recently and I'm still learning how to use this fantastic tool.
I'm working on a mobile game with dialogues obviously and I'm using the Speech Bubbles UI. After some research I figured out how to properly integrate to my project the different speech bubbles prefabs and I've even added a new "Continue Button", which wasn't here, to let the player chose when he wants to continue the conversation and switch to the next dialogue.
For a better UX as I'm working on a small screen (mobile) game, I'd like to get that continue button be fullscreen and I don't find a nice way to do that.
For now I've two "Override Unity UI Dialogue Controls" speech bubbles canvas in my two sample characters GameObjects. The problem is that the canvases have a World Space render mode and a small size to follow the characters when they move (the essence of the speech bubble I may say) which is fine.
I could move my two buttons in the "global" Canvas I use to display the others elements of UI, but It breaks my heart to separate the prefabs from their continue button which are intrinsically linked by the Unity Continue Button Fast Forward Script and its typewriter effect property .
So does someone could you help me making a transparent button as big as the screen still contained in the canvas bubbles prefabs that are only a small part of the screen?
Thank you in advance for your help and/or suggestions!
Fullscreen "Continue Button" with Speech bubbles
Re: Fullscreen "Continue Button" with Speech bubbles
Hi,
Thanks for using the Dialogue System!
What about creating a second screen space canvas next to your world space canvas? The screen space canvas would contain only the continue button. You could group them both into a prefab with a structure like this:
- Override UI
--- Bubble canvas (world space)
--- Continue button canvas (screen space)
Then you can just drop this prefab onto your characters, and all the UI stuff is self-contained. Since the continue button canvases will only have active UI elements when the conversation is waiting for the player to click continue, it shouldn't have any impact on performance.
Thanks for using the Dialogue System!
What about creating a second screen space canvas next to your world space canvas? The screen space canvas would contain only the continue button. You could group them both into a prefab with a structure like this:
- Override UI
--- Bubble canvas (world space)
--- Continue button canvas (screen space)
Then you can just drop this prefab onto your characters, and all the UI stuff is self-contained. Since the continue button canvases will only have active UI elements when the conversation is waiting for the player to click continue, it shouldn't have any impact on performance.
Re: Fullscreen "Continue Button" with Speech bubbles
Hi Tony,
Thank you very much for your really fast answer.
This solution is exactly what I needed. Simple clean and clever
I'll go with this.
Thank you very much for your really fast answer.
This solution is exactly what I needed. Simple clean and clever
I'll go with this.
Re: Fullscreen "Continue Button" with Speech bubbles
Great! Glad I could help!
Re: Fullscreen "Continue Button" with Speech bubbles
Since this reply is a bit old and I think the "Override Unity UI Dialogue Controls" is deprecated, can I create a full screen continue button in a screen space canvas that is always on top during a conversation?
What do I need to do to set this up so it only shows during a conversation?
I see there are some scripts:
ContinueButtonFastForward
StandardUIContinueButtonFastForward
UnityUIContinueButtonFastForward
All of them say:
I'd like both the mouse button, or the escape key (Which currently is bound to the Cancel action in my Rewired), and possibly the Enter key to skip in a dialogue.
Should I make a custom script for that, and call some method that controls any subtitle that is open?
Thanks!
EDIT: I have a script called "SkipButton.cs" that I got from viewtopic.php?t=1196 which has a function to accelerate the typewriter, so I guess I need that should probably solve this. I had some issues connecting it with Rewired, but I'll have a look at it again...
What do I need to do to set this up so it only shows during a conversation?
I see there are some scripts:
ContinueButtonFastForward
StandardUIContinueButtonFastForward
UnityUIContinueButtonFastForward
All of them say:
However I think normally when you fast forward in a game while the typewriter is running, it shows all the typewriter text first, and on the next click, it skips the dialogue./// This script replaces the normal continue button functionality with
/// a two-stage process. If the typewriter effect is still playing, it
/// simply stops the effect. Otherwise it sends OnContinue to the UI.
I'd like both the mouse button, or the escape key (Which currently is bound to the Cancel action in my Rewired), and possibly the Enter key to skip in a dialogue.
Should I make a custom script for that, and call some method that controls any subtitle that is open?
Thanks!
EDIT: I have a script called "SkipButton.cs" that I got from viewtopic.php?t=1196 which has a function to accelerate the typewriter, so I guess I need that should probably solve this. I had some issues connecting it with Rewired, but I'll have a look at it again...
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.
Re: Fullscreen "Continue Button" with Speech bubbles
Hi,
No need for a custom script.
The comment in the continue button script is misleading. When the typewriter effect stops, it immediately shows the entire text.
Add an invisible continue button (e.g., size 0x0) to your bubble UI. If the Dialogue System is configured to auto focus the continue button, it will still receive focus, so the Unity UI EventSystem's Submit input will still click it. To bind other input to click the button, add UI Button Key Trigger component(s). For example, you can set a UI Button Key Trigger's Key dropdown to Mouse 0 to make the left mouse button click continue.
No need for a custom script.
The comment in the continue button script is misleading. When the typewriter effect stops, it immediately shows the entire text.
Add an invisible continue button (e.g., size 0x0) to your bubble UI. If the Dialogue System is configured to auto focus the continue button, it will still receive focus, so the Unity UI EventSystem's Submit input will still click it. To bind other input to click the button, add UI Button Key Trigger component(s). For example, you can set a UI Button Key Trigger's Key dropdown to Mouse 0 to make the left mouse button click continue.
Re: Fullscreen "Continue Button" with Speech bubbles
That sounds perfect, I will try all that. Thank you!
Working on SpaceChef - A wacky open world space western, featuring a chef with nothing to loose, after he loses everything.. ;) Follow our work on @BlueGooGames.