Forum rules - please read before posting.

Kill all subtitles

edited August 20 in Technical Q&A

Is there a quicker way of killing the subtitles menu (it uses the Unity UI)?

I'm working on an FMV game and there are literally thousands of video clips, each one using subtitles created via Actionlists (Yep, that was fun) that run when I call them to run alongside the video that's playing.

Rather than having to add an additional Actionlist:Kill at the end of each video clip in case it's skipped, is there quick way that kills the subtitle menu instantly when the 'Skip' key is pressed (The space bar in this case)?

Comments

  • You can have a custom script detect your Skip input and then run the Dialog component's KillDialog function, i.e.:

    AC.KickStarter.dialog.KillDialog (true, true);
    
  • Thanks Chris. Where would I attach this?

  • It'd go in a custom script that listens out for your Skip key.

    How are you reading input in your project?

  • I'm using the Active Input Editor that triggers an Actionlist when the Skip key is pressed.

  • Place the line above in a public function inside a new C# file, then attach that script to an Empty GameObject, make it a prefab and remove from the scene.

    You can then use the Object: Call event Action to trigger the function inside the prefab.

  • Perfect, I'll give that a go :)

  • edited October 10

    Thanks for the script, Chris.

    Unfortunately the subtitles continue to play :(

    It stops the currently displaying subtitle but after the Engine:Wait within the Actionlist it then continues to display the next subtitle.

  • That's a separate issue - the above line only deals with ending the current dialogue.

    To be clear: you want to be able to end Subtitles at any point through a video, while still playing the video to completion?

    You could try manually turning off the Subtitles option, but I'll need more details about your setup. Any screenshots you can provide are welcome.

  • edited October 12

    Basically I have an Actionlist that provides the subtitles for the relevant video.

    When a video is playing and the player presses the 'skip' key, the video stops playing and I'm wanting the Actionlist to also be skipped/killed.

    At the moment I'm triggering an Actionlist that has a series of hundreds of Actionlist:Kills which is very clunky and impractical as there are over 3 thousand video clips I've to subtitle yet.

  • And are they ActionList assets / scene-based / given a specific tag?

    If you were just starting out, I'd say to use Timeline to both play the video and handle subtitle duties in one.

    As it is, you'd need to use scripting to do something tricker, like end all ActionLists with a given tag, or only those with e.g. a Dialogue: Play speech Action.

    What would be most appropriate given your setup?

  • The subtitles are asset-based and are not physically in the scenes.

    I'm willing to transfer to Timeline for this as I was looking at doing it that way originally but couldn't work out how to even add a video asset to a Timeline.

  • It wouldn't involve AC, but a VideoTrack sample by Unity can be found here:

    https://docs.unity3d.com/Packages/com.unity.timeline@1.5/manual/smpl_custom_video.html

  • I did come across that, but the Timeline doesn't even allow videoclips to be dragged and dropped onto it, unfortunately. I'm guessing those instructions are outdated.

  • I'd expect it's the Video Player you assign, rather than the clip assset itself.

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.