I have configured my dialogue system to always use the Continue button. That's working fine.
I'm also using the Subtitle Chars per second.
What I want is that when the text is still appearing and the user clicks the continue button, instead of going to the next part of the conversation, it shows the entire text. Only if the user clicks continue again, it will move the conversation forward.
A final thing... How can I map a button that will do the same as clicking the continue button.
Subtitle and progression question
Re: Subtitle and progression question
I found a solution for the last one...
I added this script to my text component:
I allows the user to click anywhere in the text area to progress the conversation as well as using the space bar to continue.
I'll change it to GetButton to make it more dynamic but anyway, it works
Now getting the other parts of the question sorted
I added this script to my text component:
I allows the user to click anywhere in the text area to progress the conversation as well as using the space bar to continue.
I'll change it to GetButton to make it more dynamic but anyway, it works
Now getting the other parts of the question sorted
Code: Select all
public class ContinueOnClick : MonoBehaviour, IPointerClickHandler {
public UnityUIContinueButtonFastForward button;
public void OnPointerClick(PointerEventData eventData) {
if(eventData.button == 0) {
button.OnFastForward();
}
}
private void Update() {
if (Input.GetKeyDown(KeyCode.Space)) {
button.OnFastForward();
}
}
}
Re: Subtitle and progression question
Hi,
That'll work, or you can resize the continue button to cover the entire text area (or the entire screen if you prefer), and set its image's alpha to zero to make it invisible.
1. On the Unity UI Dialogue UI component, if you tick Auto Focus it will automatically focus the continue button when showing a subtitle. When showing the response menu, it will automatically focus the first response button. Then Unity UI's default Submit input button will click it. In a vanilla project, the Submit input is mapped to Space and Return.
2. Add a UI Button Key Trigger component, and assign a key code and/or input button.
That'll work, or you can resize the continue button to cover the entire text area (or the entire screen if you prefer), and set its image's alpha to zero to make it invisible.
Two ways:
1. On the Unity UI Dialogue UI component, if you tick Auto Focus it will automatically focus the continue button when showing a subtitle. When showing the response menu, it will automatically focus the first response button. Then Unity UI's default Submit input button will click it. In a vanilla project, the Submit input is mapped to Space and Return.
2. Add a UI Button Key Trigger component, and assign a key code and/or input button.
Re: Subtitle and progression question
Thanks but that's what I already figured out in the code above.
What I am still trying to figure out is that while the text is appearing, if you press the continue button, it will show the entire text instead of moving to the next part.
Only if all the text is displayed, the continue button needs to move to the next part.
What I am still trying to figure out is that while the text is appearing, if you press the continue button, it will show the entire text instead of moving to the next part.
Only if all the text is displayed, the continue button needs to move to the next part.
Re: Subtitle and progression question
That's what the UnityUIContinueButtonFastForward component does. You can test this out in this scene: Assets / Dialogue System / Examples / Unity UI Examples / Generic UI Example Scene. Inspect the Dialogue Manager, and set Subtitle Settings > Continue Button to Always. Then play the scene and talk to Private Hart. The first two subtitles are really short, but the third subtitle is long enough that you should have time to click the continue button to see it fast forward to the end of the text (i.e., show the entire text). Then the second click should progress the conversation.
If it's not working that way in your scene, let me know; we can get to the bottom of it.
If it's not working that way in your scene, let me know; we can get to the bottom of it.
Re: Subtitle and progression question
Yes so that's exactly what I have...
My continue button has the Unity UI Continue Button Fast Forward.
If I click it, he jumps to the next bit of the conversation.
The Continue button is set to always in the Dialogue Manager.
My continue button has the Unity UI Continue Button Fast Forward.
If I click it, he jumps to the next bit of the conversation.
The Continue button is set to always in the Dialogue Manager.
Re: Subtitle and progression question
Are the fields set in the Unity UI Continue Button Fast Forward component? (You can compare yours with the setup in the Generic UI Example Scene.) If the Typewriter Effect field isn't set to the NPC subtitle's typewriter effect, it will jump to the next bit of the conversation instead of telling the typewriter effect to fast forward to the end.
Feel free to send an example scene to tony (at) pixelcrushers.com if nothing jumps out at you. I'll be happy to take a look.
Feel free to send an example scene to tony (at) pixelcrushers.com if nothing jumps out at you. I'll be happy to take a look.
Re: Subtitle and progression question
Ah the typewriter effect was the problem here.
I have a customized UI and I know I copied some things from the example UI after which I removed it. The typewriter effect was set to None and as soon as i dropped the correct one in, it worked like a charm.
Thanks for the help!
I have a customized UI and I know I copied some things from the example UI after which I removed it. The typewriter effect was set to None and as soon as i dropped the correct one in, it worked like a charm.
Thanks for the help!
Re: Subtitle and progression question
Happy to help!