Search Issue Tracker
By Design
Votes
0
Found in
5.6.1f1
Issue ID
922465
Regression
No
MonoBehaviour::OnAudioReadFilter processing does not affect audio when AudioSource::PlayOnAwake is checked
To reproduce:
1. Open the "UnityPlayOnAwakeBug" scene in the attached project
2. Select the "Trigger Source" Game Object from the Hierarchy
3. Uncheck the "Play On Awake" in the Inspector in Audio Source component
4. Play the scene and press "P" to hear how audio should sound
5. Stop the scene and check "Play On Awake" in the Inspector once again
6. Play the scene and press "P"
Desired outcome: Audio clip sounds the same as being played with "Play On Awake" unchecked.
Actual result: Audio clip sound is significantly louder when "Play On Awake" is checked.
Note: The issue seems to happen only when there is no AudioClip attached in the Audio Source component (when AudioClip is called from another script).
Reproduced with 5.5.4p1, 5.6.0b3, 5.6.1f1, 5.6.2f1, 2017.1.0a1, 2017.1.0f1, 2017.2.0b1
Update: The issue is by design, because when there is an AudioSource that has no clip assigned but does have a MonoBehaviour implementing OnAudioFilterRead, it will instantiate the OnAudioFilterRead as a source when the sound is started either via the "Play On Awake" flag or a regular Play() call. When “Play On Awake” is off and Play() is not called, the PlayOneShot call will instantiate the OnAudioFilterRead as an effect that filters the signal mix of the one-shot sources.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Opening Terrain Prefab in Prefab Editing Mode throws "NullReferenceException" error
- [Search] Dragging query pills put them behind the search text field
- A CustomPropertyDrawer that returns a PropertyField for a property named the same as a child field will not render all child fields
- Graphics Settings shows default values instead of the real values in the Rendering Debugger when Volume.profile is assigned via script
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
Add comment