Copyright © 2026 Unity Technologies
Audio: Fixed an issue that would cause Unity to crash when you manually destroy a streamed audio clip.
2022.1 has reached end of life so the issue will be fixed in a newer version.
Reproduction steps:
Expected: The editor doesn't crash and the editor throws an error. If using DestroyImmediate, the audio source should stop outputting sound.
Actual: The audio source continues outputting sound for a destroyed audio clip and the editor crashes after a few seconds.
Reproducible on: 2021.3.35f1, 2022.3.20f1, 2023.2.13f1, 2023.3.0b10
Reproduced on: Windows 10, Windows 11, MacOS (M1)
Note
Expected error:
Destroying assets is not permitted to avoid data loss. If you really want to remove an asset use DestroyImmediate (theObject, true); UnityEngine.Object:Destroy (UnityEngine.Object) StreamAudio:Update () (at Assets/StreamAudio.cs:27)
First few lines of the Stacktrace (Windows):
(Unity) purecall (Unity) AudioClip::WWWRead (Unity) FMOD::UserFile::reallyRead (Unity) FMOD::UserFile::reallyAsyncRead (Unity) FMOD::FileThread::threadFunc
Issues you vote on will appear here