Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to get sounds playing in animation play (rather than game mode play)

Discussion in 'Animation' started by casalepeter, Mar 3, 2020.

  1. casalepeter

    casalepeter

    Joined:
    Sep 25, 2018
    Posts:
    3
    This is a very hard puzzle, but should be obvious? What am I missing?

    I am making an intro cutscene, which is roughly 3 minutes long.

    For each piece of dialog, I have keyframes which activate many subtitles: a GameObject that includes Text and AudioSource. These are all in the right order, I am trying to sync everything so that the subtitle only lasts as long as the audio source. I basically have to guess how long to wait before switching to the next dialog subtitle, and then push play and watch the whole thing through until I get to the part with the dialog, and then watch to see what happens. If the new subtitle comes in too early, then it will cut off the audio (when its gameobject is deactivated by the animation). If the next subtitle comes in too late, there is a weird pause in the audible dialog, while the subtitle continues to display.

    When I push play to view the animation, the sound plays fine, at the right time, everything works. The problem is the repeated guesswork on how much I have to delay the audio by, in order to know how to space the animation keyframes! Does this make any sense at all? Please help :)
     
  2. casalepeter

    casalepeter

    Joined:
    Sep 25, 2018
    Posts:
    3
    I hope this is sensible :)