Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed Captioning system for SFX #498

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

codeedward
Copy link

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:

  1. 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.
  2. DisplayCaption method displays the caption for 'Duration' number of seconds (set in the AudioClipsGroup).
  3. If AudioCueSO has more than one AudioClipGroup then it will be displayed with the offset.
  4. Update method of the ClosedCaptioningManger takes care of the off-screen functionality.
  5. 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.

@CLAassistant
Copy link

CLAassistant commented Sep 7, 2021

CLA assistant check
All committers have signed the CLA.

@ciro-unity ciro-unity added the enhancement New feature or request label Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants