The AudioClipInfo conststructors that accept AudioConfig as a parameter will create a new AudioModifier unless one is passed as a parameter.
However the AudioConfig has an AudioModifier property. I have changed the AudioClipInfo constructors to use this property instead. I am using the Master Audio integration. This allows me to easily pass modifiers so they are applied for Master Audio.
I suspect this is probably an oversight in the current code and the constructors were meant to do this. This change might help others and so I was hoping you might consider making it permanent in UCC?
However the AudioConfig has an AudioModifier property. I have changed the AudioClipInfo constructors to use this property instead. I am using the Master Audio integration. This allows me to easily pass modifiers so they are applied for Master Audio.
I suspect this is probably an oversight in the current code and the constructors were meant to do this. This change might help others and so I was hoping you might consider making it permanent in UCC?
C#:
public AudioClipInfo(int clipIndex, AudioConfig audioConfig)
{
m_ClipIndex = clipIndex;
m_AudioClip = audioConfig != null ? audioConfig.GetAudioClip(clipIndex) : null;
m_AudioConfig = audioConfig;
//m_AudioModifier = new AudioModifier(); // Original code
m_AudioModifier = audioConfig.AudioModifier; // Modified code
}