Unity-Simple-SRT
Unity-Simple-SRT copied to clipboard
An array of audioclips?
trafficstars
Great, simple script! I am trying to work on it as I need different audio files to play along with different sub texts based on different colliders. Any idea on how to achieve this? After setting the array ([]) at the beginning of the displayer script, I am a little lost.
Thank you in advance for your help!
Hey @albertobonanni ! Just my two cents, if you haven't already come up with a solution I would move responsability of coordinating multiple audio files and their subtitles to someone else besides the displayer script, let's call it an AudioCoordinator, have it be responsible for:
- telling your
AudioSource(or whatever playback method) andScriptDisplayerthe current audio file and matching current subtitle file - detecting the end of your audio clip (https://forum.unity.com/threads/detecting-end-of-audio-clip.60897/) and moving onto the next audio clip and subtitle file