Search Issue Tracker
Fixed in 2021.2.X
Votes
0
Found in
2018.4
2019.4
2020.2
2020.2.1f1
2021.1
2021.2
Issue ID
1314527
Regression
No
AudioClip reference is lost when loading a new Scene even if AudioSource is set to DontDestroyOnLoad
Reproduction steps:
1. Open the user's attached project and Scenes/MenuScene scene
2. Enter the Play mode
3. Select Start Game in the Game view and listen to the Audio
Expected result: Audio is played even after loading a new scene
Actual result: Audio is lost after loading a new scene
Reproducible with: 2018.4.32f1, 2019.4.20f1, 2020.2.5f1, 2021.1.0b7, 2021.1.0a6
Note: Audio reference is not lost if the Script component that holds Audio Clip reference is open in the Inspector when loading a scene
-
serdarwindows10
Mar 23, 2023 15:14
This still happens in 2021.3.2f1 if there are no references left to the clip (In our case it was the script that held the reference being destroyed), can be worked around by holding a reference to the clip in any script that won't be destroyed, simply using a coroutine works
private IEnumerator HoldHostage(AudioClip clip) {
yield return new WaitForSeconds(clip.length + 1.0f);
}
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
- Search description string is always truncated
- [VFX] When Grouped Nodes are converted to Subgraph Operator resulting Graph Node is not included in the Group
- Search window icons are less sharp/more pixelated than other editor icons
- The Inspector can be covered when scaling the horizontal separator bar
- A script cannot be attached to a GameObject when there is another script that is generic with the same name in a different folder
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a13