Search Issue Tracker
By Design
Votes
2
Found in
2021.3.41f1
2022.3.40f1
6000.0.13f1
6000.1.0a2
6000.2.0a1
6000.3.0a1
Issue ID
UUM-77163
Regression
No
Turning off "Preload Audio Data" results in an "Cannot create FMOD::Sound instance for clip" error when AudioClip is loaded from an asset bundle
How to reproduce:
1. Open the attached “IN-81310” Project
2. Open the “TestAudioAssetBundle” scene
3. Enter Play mode
4. Select the “PreloadOff” button in the UI
5. Observe the error in the Console window
Expected result: Using an Asset Bundle for loading Audio Clips causes no issues whether “Preload Audio Data” is turned on or off
Actual result: Turning off “Preload Audio Data” makes audio playback fail
Reproducible in: 2021.3.41f1, 2022.3.40f1, 6000.0.13f1
Reproducible on: Windows 10, Windows 11
Not reproducible on: No other environments tested
Notes: also reproducible in Player
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
- Channel remapping dropdown in the Terrain Layer does not open when clicked on the title
- The Editor freezes indefinitely when a large number of elements are entered in the Subgraphs or Categories lists
- Some Visual Effects package Assets links to documentation are not working
- Heatmap asset’s documentation button in the Inspector window leads to “Sorry... that page seems to be missing!” page when clicked
- Crash on MonoBehaviour::CallMethodIfAvailable when performing various actions
Resolution Note:
The bug raised comes from an issue in the Utage package, used in the repro project. Its asset loading system does not handle the scenario where an asset bundle item does not come in preloaded. When the item is deserialized from the bundle, even if the AudioClip instance exists, it's still dissociated from its data. When `preloadAudioData == false`, this means that the audio data as to be explicitely loaded in FMOD to be available. In AssetFileUtage.LoadAsset, adding a verification for this value to call AudioClip.LoadAudioData() if necessary fixes the issue.
Another potential fix would have been to keep the audio asset bundle loaded until the play time, because the virtual file system handler responsible for reading asset bundles would still be available to load and read the file on the fly.
In a simple Unity project, the scenario described in the bug causes no issue.