Search Issue Tracker
By Design
Votes
3
Found in
2019.4
2020.3
2020.3.12f1
2021.1
2021.2
2022.1
Issue ID
1345650
Regression
No
Information about Audio Clips loaded using a UnityWebRequest is lost after calling AudioSettings.Reset()
Reproduction steps:
1. Open the attached project "Case_1345650" and load Scene "SampleScene"
2. Enter Play Mode
3. Click the "Get Streaming Sound" button
4. Click the "Play Streaming Sound" button
5. Observe the information about the AudioClip in the Console and the Audio Clip playing
6. Click the "Activate" button
7. Click the "Play Streaming Sound" button
8. Observe the Console again
Expected result: The Audio Clip plays and all of the information about the Audio Clip logged remains the same
Actual result: The Audio Clip does not play and the information in the Console differs
Reproducible with: 2019.4.29f1, 2020.3.14f1, 2021.1.14f1, 2021.2.0b3, 2022.1.0a1
Could not test with: 2018.4 (Project's UI breaks)
Note:
- Issue was originally found on iOS when calling UnitySetAudioSessionActive(1), however, calling AudioSettings.Reset() shows the exact same behavior and offers an easier reproduction
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The Camera first person mode in Cameras overlay is greyed out and not clickable when the Editor is restarted with the Game View focused
- Scene View doesn't select the Canvas when it's clicked with the View Tool
- Transform fields are impossible to edit when Inspector window is resized
- Actions in UI Builder Preview mode are not fully reset after exiting the Preview mode
- Transform field values are no longer visible when Inspector window is resized
Resolution Note:
Only disk-based AudioClips get automatically reloaded, all other audio clip types created using WWW.GetAudioClip or AudioClip.Create, but also audio clips associated with Microphone are volatile and will be lost when a script- or user-induced reset happens (the latter could be plugging in headphones/HDMI device with mismatching sample rate or speaker format, or changing OS sound system settings).
See the note about the OnAudioConfigurationChanged callback (and the example) in https://docs.unity3d.com/ScriptReference/AudioSettings.Reset.html for how to react on device changes. In this case you would need to keep track of and reload all WWW streams from here.