OnContinue once makes all subtitles play superfast
Posted: Wed Jan 20, 2021 7:29 am
I'm trying to make a button that covers the screen (yellow in the video, but will be invisible) that is shown when a conversation happens, that you can click, and it will skip to the end of the dialogue, then to the next bubble, similar to this thread: https://www.pixelcrushers.com/phpbb/vie ... php?t=1196.
First of all, I had problems using dialogueUI.OnContinue, as I have two different dialogue panels, one for the player, and one for the npc. Both are shown slightly at the same time (one hides when the next one shows). So I didn't understand how to use a single DialogeUI and get the typewriter from there.
However, this is what I'm doing:
1) Get the current speaking actor.
2) Get the CustomStandardUISubtitlePanel it's using
3) Run the OnContinue() method on it
The problem is what you see in the video, it skips that subtitle, then plays 0.5 of every subtitle, and keeps skipping to the next. I only run OnContinue once, so I can't see why this should happen. I have the debug log also so you might be able to see something in there.
Any idea what's going on, and is there any better way of getting the current SubtitlePanel, or another way to send a OnContinue-message, that won't be as crazy as this?
Also I have WaitForMessage(Forever) in the sequencer as you can see in the logs. I attached the CustomSkipButton script too.
Thank you in advance!
First of all, I had problems using dialogueUI.OnContinue, as I have two different dialogue panels, one for the player, and one for the npc. Both are shown slightly at the same time (one hides when the next one shows). So I didn't understand how to use a single DialogeUI and get the typewriter from there.
However, this is what I'm doing:
1) Get the current speaking actor.
2) Get the CustomStandardUISubtitlePanel it's using
3) Run the OnContinue() method on it
The problem is what you see in the video, it skips that subtitle, then plays 0.5 of every subtitle, and keeps skipping to the next. I only run OnContinue once, so I can't see why this should happen. I have the debug log also so you might be able to see something in there.
Any idea what's going on, and is there any better way of getting the current SubtitlePanel, or another way to send a OnContinue-message, that won't be as crazy as this?
Also I have WaitForMessage(Forever) in the sequencer as you can see in the logs. I attached the CustomSkipButton script too.
Thank you in advance!
Code: Select all
var currentSpeaker = DialogueManager.currentConversationState.subtitle.speakerInfo.transform;
if (currentSpeaker == null) return;
uiSubtitlePanel = currentSpeaker.GetComponentInChildren<CustomStandardUISubtitlePanel>();
if (uiSubtitlePanel == null) {
Debug.Log("No uiSubtitlePanel found");
return;
}