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
Comments (1)
-
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
- Environment is partially black when re-opening the newly created HDRP project for the second time
- Manual Reference button for Render Graph section in Rendering Debugger opens a missing Manual page
- Water Surface is missing the Wireframe when Scene is switched to Shaded Wireframe mode
- Water surface is not rendered when using Unlit Draw Scene view mode
- Node Previews are not centered when Nodes have a longer name in Shader Graph
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0a13