Forum rules - please read before posting.

Timeline Subtitles Disappear After Choosing Cutscene Conversation Option

edited March 2021 in Technical Q&A

Hello. I use Timelines during cutscenes. Normally, Timeline speech subtitles work fine, but I'm having an issue when I transition from a Cutscene Conversation. After clicking a Conversation Option (More than 1 option), I transition to a new Timeline using a Cutscene. At times, when an NPC prefab speech line is played (in the new Timeline immediately after choosing an option in the Conversation), the subtitle flashes on, then disappears. Sometimes it's random, but other times it persists almost every time I test the conversation in the Editor (Play Mode).

1) When I play the affected Timeline with the speech on it's own, without the conversation transition, it works fine.
2) The Conversation Options have a timer, each over 5 seconds.
3) Doesn't seem to affect other Speech Subtitles after the 1st transitioned Timeline.
4) Sometimes it affects 1 NPC Speech Subtitle, or multiple NPC's within the same Timeline.


Things that I have tried, but found ineffective:

1) Duplicated the NPC prefabs with a different constant ID. Replaced speech NPC with new prefab.
2) Transitioned Conversation to the new Timeline inside the same Cutscene.
3) Transitioned Conversation to the new Timeline in a separate Cutscene.
4) I've set the Cutscene as run in background.
5) Tried 'forcing subtitles to display when no speech audio is found' (under speech audio setting).
6) Created new Subtitles Menu using Unity Ui. The entire canvas flashes with the Text.
7) Removed transition effects from the Conversation Menu and Subtitle Menu.
8) Since I'm using the Timeline, using Dialogue: Play Speech action (click play in background option) doesn't apply.
9) Added the ToggleSkipSpeech script (ignoreSkipSpeechInput) to the project.
10) I've tried adding an Engine: Wait 0 seconds action (after the conversation action, before the new Timeline).


Unity Version: 2019.4.18f1 (LTS)
Previous AC Version: v1.72.4
Current AC Version: v1.73.3
Happened in a previous version early 2020.


Subtitles Menu Details

Menu name: Subtitles
Source: Adventure Creator
Start game locked off? Unchecked
Ignore Cursor clicks? Checked
No ActionList when turn on/off
Appear type: When Speech Plays
For speakers of type: All
For Speech of type: All
Duplicate for each line? Tried both Unchecked and Checked
Ignore 'Subtitles' option: Checked
Also show when paused? Checked

All Speech Manager / Speech Audio options Unchecked

Comments

  • At what point in the Timeline does the Speech track begin? In the first frame, or is there a delay? If no delay, what is the result of adding one?

    Speech tracks have a "Playback mode" option in their Inspector. Which is it currently set to, and does the issue persist if you change it?

    Here's a script, MenuEventTest.cs, that will report whenever a speech line ends or the Subtitle menus turns off. Place it in your scene and check the Console for messages. Can you share the full messages that show for the line in question?

    using UnityEngine;
    using AC;
    
    public class MenuEventTest : MonoBehaviour
    {
    
        private void OnEnable ()
        {
            EventManager.OnMenuTurnOff += OnMenuTurnOff;
            EventManager.OnStopSpeech_Alt += OnStopSpeech;
        }
    
        private void OnDisable ()
        {
            EventManager.OnMenuTurnOff -= OnMenuTurnOff;
            EventManager.OnStopSpeech_Alt -= OnStopSpeech;
        }
    
        private void OnMenuTurnOff (AC.Menu _menu, bool isInstant)
        {
            if (_menu.title == "Subtitles")
            {
                Debug.Log ("Turned off subtitles menu");
            }
        }
    
        void OnStopSpeech (Speech speech)
        {
            Debug.Log ("Ended speech " + speech.log.fullText);
        }
    
    }
    
  • edited March 2021

    The First Timeline Speech track starts at frame 399. After choosing the Conversation option, The Second Timeline Speech track starts at 272. Only my animations and Camera tracks start on the first frame (I understand adding certain tracks to frame 1 causes problems).

    The issue persists when swapping the Speech track Playback Modes.


    Just to be clear, the Subtitles are not permanently turned off, but it is a recurring issue throughout my entire project (multiple scenes). The Speech track Subtitles will flicker on, then off at the bottom of the screen, but it usually only affects the first or second Speech track in the second Timeline (After choosing the Conversation Option). Other Speech tracks in the same Timeline will play after a previous Speech track flickers off. And, the Speech tracks in the Timeline(s) after the second Timeline will play just fine.

    This issue doesn't happen on every single Conversation Option, but it does happen on most of them. Sometimes it happens after playing the Conversation several times. Sometimes it happens every single time. Sometimes it can be fixed by replacing the NPC prefab in the Speech track, but not fix the same issue in another Scenes Speech track.


    [12:26:32] Ended speech This is a test speech line. First Timeline. UnityEngine.Debug:Log(Object)

    Ended speech This is a test speech line. First Timeline.
    UnityEngine.Debug:Log(Object)
    MenuEventTest:OnStopSpeech(Speech) (at Assets/__2019/MenuEventTest.cs:29)
    AC.EventManager:Call_OnStopSpeech(Speech, Char) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:129)
    AC.Dialog:EndSpeech(Int32, Boolean) (at Assets/AdventureCreator/Scripts/Speech/Dialog.cs:852)
    AC.Dialog:EndSpeechByCharacter(Char) (at Assets/AdventureCreator/Scripts/Speech/Dialog.cs:787)
    AC.SpeechPlayableMixer:StopSpeaking() (at Assets/AdventureCreator/Scripts/Speech/Timeline/SpeechPlayableMixer.cs:83)
    AC.SpeechPlayableMixer:ProcessFrame(Playable, FrameData, Object) (at Assets/AdventureCreator/Scripts/Speech/Timeline/SpeechPlayableMixer.cs:59)

    [12:26:32] Turned off subtitles menu UnityEngine.Debug:Log(Object)

    Turned off subtitles menu
    UnityEngine.Debug:Log(Object)
    MenuEventTest:OnMenuTurnOff(Menu, Boolean) (at Assets/__2019/MenuEventTest.cs:23)
    AC.EventManager:Call_OnMenuTurnOff(Menu, Boolean) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:794)
    AC.Menu:TurnOff(Boolean) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:1945)
    AC.PlayerMenus:UpdateMenu(Menu, Int32, Boolean, Boolean) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1447)
    AC.PlayerMenus:UpdateAllMenus() (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2088)
    AC.StateHandler:Update() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:230)

    [12:26:37] Ended speech This is the second Timeline. UnityEngine.Debug:Log(Object)

    Ended speech This is the second Timeline.
    UnityEngine.Debug:Log(Object)
    MenuEventTest:OnStopSpeech(Speech) (at Assets/__2019/MenuEventTest.cs:29)
    AC.EventManager:Call_OnStopSpeech(Speech, Char) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:129)
    AC.Dialog:EndSpeech(Int32, Boolean) (at Assets/AdventureCreator/Scripts/Speech/Dialog.cs:852)
    AC.Dialog:EndSpeechByCharacter(Char) (at Assets/AdventureCreator/Scripts/Speech/Dialog.cs:787)
    AC.SpeechPlayableMixer:StopSpeaking() (at Assets/AdventureCreator/Scripts/Speech/Timeline/SpeechPlayableMixer.cs:83)
    AC.SpeechPlayableMixer:ProcessFrame(Playable, FrameData, Object) (at Assets/AdventureCreator/Scripts/Speech/Timeline/SpeechPlayableMixer.cs:59)

    [12:26:37] Turned off subtitles menu UnityEngine.Debug:Log(Object)

    Turned off subtitles menu
    UnityEngine.Debug:Log(Object)
    MenuEventTest:OnMenuTurnOff(Menu, Boolean) (at Assets/__2019/MenuEventTest.cs:23)
    AC.EventManager:Call_OnMenuTurnOff(Menu, Boolean) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:794)
    AC.Menu:TurnOff(Boolean) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:1945)
    AC.PlayerMenus:UpdateMenu(Menu, Int32, Boolean, Boolean) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:1447)
    AC.PlayerMenus:UpdateAllMenus() (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2088)
    AC.StateHandler:Update() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:230)


  • edited March 2021

    Those messages should only be appearing under the following conditions:

    • Playback mode is set to Clip Duration
    • There are no speech clips at the current point in the Timeline

    I'm assuming they're showing while the second isn't true, i.e. you're still midway-through a clip. Though, the randomness involved with NPCs and Conversation option does suggest there's some other factors involved.

    Would you be able to provide a test package that demonstrates the issue? A single scene, without graphics/audio, should be enough, so long as it also includes the Timeline asset, Manager assets, and character prefab(s). If you can create a .unitypackage and PM it to me, along with instructions on how to experience the problem, I feel that would be the best way to see the issue for myself.

  • edited March 2021

    Thanks for the package, I've recreated the issue.

    At least with the demo files you sent, the problem was that you had multiple speech tracks linked to the same character - in this case, the Player.

    Doing so creates a conflict, with each track trying to control the same character's speech status. Moving the different clips onto one track for the Player resolved the issue on my end.

    This limitattion is stated in the Manual, but I shall see if it's possible to add a further warning when running AC's Timeline Action.

  • edited March 2021

    There it is! In a way. The issue was the multiple speech tracks for the same character, but instead of coming from the same Timeline, it was coming from the previous Timeline.

    You were correct in the above and I received the same reaction after removing the extra track. Thing is, I didn't have any duplicates in any of my scenes, but I was still experiencing the issue. The Speech Subtitles in the package I sent you seemed to cut off as soon as the Conversation timer started (ignoring the length of the Speech track in the Timeline), but the Subtitles in my projects Timelines continued even after the Conversation timer started/ended.

    The affected Timeline was using the previous Timeline to account for the duplicate NPC speech track. This is why the issue felt so random throughout my project. If an option is chosen before the Speech Track finishes, then the next Subtitle for that character will flash off in the next timeline.

    Since I prefer the Speech track to continue even after the Conversation timer starts/ends, I will simply add an empty (no mesh) placeholder NPC prefab to the 1st Timeline. It works.

    Thanks, Chris.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.