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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
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.