Search Issue Tracker
By Design
Votes
0
Found in
2022.1.0a12
2022.1.22f1
2022.2.0b14
2023.1.0a18
Issue ID
UUM-18551
Regression
Yes
Audio starts playing from the beginning when Undo/Redo Audio Source changes in Play Mode
To reproduce:
* Download the "Terrible Tweeters - Audio.zip" project and open it in Unity;
* Open the "Level1" scene;
* Select the "Music" gameObject in the Hierarchy;
* Enter Play mode;
* Observe that the Audio starts playing;
* In the "Music" gameObject Audio Source modify the Volume Slider;
* Observe that the Volume of the Audio decreases
* Undo your change
Expected result: Audio Volume restores to the previous value and Audio continues playing;
Actual result: Audio Volume restores to the previous value and Audio starts playing from the beginning;
Notes:
* This issue happens with Redo too;
Reproducible in Unity 2022.1.0a12, 2022.1.22f1, 2022.2.0b14, and 2023.1.0a18
Not reproducible in Unity 2022.1.0a11
Regression in Unity 2022.1.0a12
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
- “NullReferenceException” error thrown when switching Editor Theme to Light if “Unity Version Control” tab is enabled
- A Warning is displayed in the Inspector when a Mesh with any Material is added as a Terrain Detail
- [Android][Vulkan] Memory leak when playing and stopping a video using the Video Player on some devices
- Caret moves by a character when typing "." and any number into 'Grid and Snap' toolbar's input field
- Missing #pragma directives warnings appear in Inspector when including .hlsl file in Shader
Resolution Note:
The undo system changed behavior in 2022.1 in that it now activates and deactivates game objects. Undo basically takes a backup of the objects before and after a change. Since the backup can potentially reorder the transform hierarchy, it is necessary to deactivate before backup restoration, then activate again.
This change was necessary to fix a large class of undo bugs. Worst cases were ones where subtle changes were introduced in the scene causing the scene files to include bad data, causing a crash the next time you would load the scene. If the user was able to figure out what was happening and be able to revert the scene in version control then great, only a few hours of work would be lost. Worst case, users would have to redo the entire scene
It is also the exact behavior as what happens when changes to a prefab is applied to an instance in the scene, so it is more aligned to other functionality in the Unity editor.
So, restoring the previous behavior for audio only would misalign with the general behavior across the engine.