Search Unity

Question How can I Assign an AudioSource to a Timeline audio track at runtime

Discussion in 'Scripting' started by DannyElliott, Feb 16, 2021.

  1. DannyElliott

    DannyElliott

    Joined:
    Jul 26, 2018
    Posts:
    2
    HI There!

    I have a script that will find a specific audio source attached to a game object via a tag.
    That works fantastic.
    But now I need to take that found audio source and assign it to the output of a(n) audio track(s) in a time line at runtime.
    I am trying to prevent having to apply the audio source (which leads to an Audio Mixer Group) by hand to a massive amount of timelines with audio tracks and blank audio outputs.

    Thanks
     
  2. am_GA

    am_GA

    Joined:
    Oct 4, 2018
    Posts:
    20
    +1, also interested in understanding how to bind an AudioSource to an AudioTrack or AudioPlayableAsset on the Timeline via script. Need to set track volumes from a config file.