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
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
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.