I added Closed Captioning system for SFX. All my journey, considerations, screenshots and final video which presents the functionality in the game is available in the forum thread (link below):
https://forum.unity.com/threads/subtitle-system-for-sfx.1038562/
What is added:
in the language settings we can now turn on/off the captioning
visualisation of the sound in the 3d space
language localisation (new table with translations created)
object pooling for the visualisation prefabs
off-screen indicator to the sound in 3d space (when we move the camera to the sound so it's visible on the screen, then an arrow indicator disappear)
all translations, duration of the caption and whether the sound should be visualised are customizable in the AudioClipsGroup in AudioCueSO
Quick description:
Main class responsible for this functionality is ClosedCaptioningManger. It sits in the Gameplay scene. It listens to the AudioCueEventChannelSO (same event which AudioManager listens to). Previously I was using PersistenManagers but realised it wasn't the best place for it.
DisplayCaption method displays the caption for 'Duration' number of seconds (set in the AudioClipsGroup).
If AudioCueSO has more than one AudioClipGroup then it will be displayed with the offset.
Update method of the ClosedCaptioningManger takes care of the off-screen functionality.
Separate prefab is created for the Caption so if someone with graphic skills would like to can make the caption to look awesome :)
I had a great fun creating this. Not mentioning I've learned a lot! Hope this will be useful.
I added Closed Captioning system for SFX. All my journey, considerations, screenshots and final video which presents the functionality in the game is available in the forum thread (link below): https://forum.unity.com/threads/subtitle-system-for-sfx.1038562/
What is added:
Quick description:
I had a great fun creating this. Not mentioning I've learned a lot! Hope this will be useful.