Search Issue Tracker
Fixed
Fixed in 2022.2.4f1, 2023.1.0a26
Votes
1
Found in
2022.2.0b9
2023.1.0a11
Issue ID
UUM-16018
Regression
No
Editor unselects elements when entering and then exiting the Play Mode
Reproduction steps:
# Open the user’s attached project
# In Hierarchy go to Menu > Song Panel Collapsed
# In Inspector scroll down to “Time Between Elements” and change the value of it to 0.16
# Press CTRL + S to save
# Enter the Play Mode
# Exit the Play Mode
# Observe the results
Expected result: “Song Panel Collapsed” Object is still selected in the Hierarchy
Actual result: “Song Panel Collapsed” Object is no more selected
Reproducible with: 2022.1.0b10, 2022.1.17f1, 2023.1.0a1, 2023.1.0a11
Not reproducible with: 2021.3.10f1
Could not test with: 2020.3.40f1,2022.1.0a1 - 2022.1.0b9, 2022.2.0b1, 2022.2.0b8 (NullReferenceException: Object reference not set to an instance of an object
UnityEditor.ProjectBrowser.FrameObject)
Notes:
* Using "Enter Play Mode Options" with "Disable Reload Domain", "Disable Reload Scene" and "Disable Scene Backup"
* Reproduction video is in internal notes “Unity Select Issue - 2022 09 02 13 51 27”
* Could not find the first regressed version due to the errors with alpha/beta versions
-
richardkettlewell
Jan 03, 2023 15:54
Hi, it happens because we added a new enter playmode optimization that skips saving scene backups, if the scenes are not dirty (unchanged vs. the on disk scene file). however, there are edge cases where we fail to detect the dirty state correctly.
One of these edge cases is with prefab instances, which were not getting fully backed up to disk even though they were dirty. This mistake was causing them to be different when coming back out of playmode, and also causing their selected state to not be properly restored.
Unfortunately, for historical design reasons that we are now somewhat stuck with, this optimization cannot work robustly, so we have decided to remove it.
-
Ghat-Smith
Dec 19, 2022 12:09
Would it be possible to have a quick explanation about why the "Scene Backup fast enter playmode optimization" (which should just skip saving non dirty scenes) may cause issue like this one? It seems completely unrelated to me but I probably miss something.
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
- [Android] [Vulkan] Cubes stuck on the first few frames of rotation and application flickering when an Overlay Camera is added to the Camera Stack with MSAA enabled
- Profiling information icon does not update for Light Mode
- [Linux] Type to select functionality is missing for drop down menus
- TextMeshPro calculates Width Compression incorrectly when using certain values in the WD% field
- VFX Graph link contrasts fail WCAG guidelines
Resolution Note (fix version 2023.1.0a26):
Fixed in: 2023.1.0a26