Search Unity

Timeline adjusts with Time.timescale, except Audio Track

Discussion in 'Timeline' started by justdizzy, Dec 4, 2017.

  1. justdizzy

    justdizzy

    Joined:
    Mar 8, 2016
    Posts:
    89
    Using Unity 2017.2.0p2 on macOS

    I've made a timeline and am giving the user the option to "fast forward" trough it via a button that when pressed changes Time.timescale to 10. This is working great for animation and activation tracks, but when I added an Audio Track with a singular long clip, the audio does not "speed up", it just plays normally. If I change the Speed Multiplier in the editor when not playing, the clip is sped up (and duration shortened), but doesn't work if playing, either in editor or programmatically.

    What is the "proper" way to get the audio to match timescale in a Timeline Audio Track?

    My workaround so far:

    If I bind the Audio Track to an Audio Source instead of dragging in the clip itself, I can programmatically adjust the pitch, but then I have no activation controls in the timeline, nor can I see the waveform of the audio.
    So now, I have to add an Activation Track bound to a game object containing that Audio Source, which I can then de/activate the whole object as needed, but then there is no benefit to having an Audio Track bound to the Audio Source as I can access the AudioSource through the bound Game Object.

    I did revert the Audio Track to the audio clip itself to see the waveform, but then I have to make sure to mute that track during playing.
     
    IARI likes this.