Search Unity

Audio Change order of audio filter components via script

Discussion in 'Audio & Video' started by ReaktorDave, Nov 6, 2018.

  1. ReaktorDave

    ReaktorDave

    Joined:
    May 8, 2014
    Posts:
    139
    I'm hitting a hard wall here. Is it possible to change the order of an audio filter component via script without using the UnityEditorInternal namespace?

    I need this for an audio system that uses an object pool of audio sources. The pool is controlled by audio events set up by the audio designer. The order of the audio filter components matters as some of these effects are nonlinear. Currently, I'm adding the audio filter components to the audio source pool as needed, but that has the disadvantage of cpu and gc overhead, which was the entire reason for starting the object pool in the first place.