Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.32f1
2022.3.13f1
2023.2.0f1
2023.3.0a14
6000.0.0b11
6000.1.0a7
7000.0.0a1
Issue ID
UUM-57057
Regression
No
GameObject created by "new GameObject()" does not disappear when exiting Play mode.
How to reproduce:
1. Open the user-attached project
2. Open the “MinJoon” Scene
3. (Optional) Make sure there is no “@Pool_Root” GameObject in the Hierarchy window
4. Enter Play mode and then Exit Play mode
5. Observe the Hierarchy window
Expected results: “@Pool_Root” GameObject gets destroyed after exiting Play mode
Actual results: “@Pool_Root” GameObject stays in the Hierarchy window
Reproducible with: 2021.3.32f1, 2022.3.13f1, 2023.2.0f1, 2023.3.0a14
Reproduced on: Windows 10 (by reporter), Windows 11
Not reproducible on: No other environment tested
Notes:
- Not reproducible on a new project
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: Inspector section icon is less sharp/more pixelated than other editor icons
- 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
Resolution Note:
The problem in this case is in the customer's project: there is a class named 'HealthBar' that on start calls 'ManagerRoot' full or partial initialization depending on if we're in Play Mode. So when we enter play mode, the chain is triggered because PlayMode is started, but when we exit it, due to 'HealthBar' class having ExecuteInEditMode it is triggered again, because it entered edit mode. The most simple solution to this would be either removing ExecuteInEditMode in 'HealthBar' if not necessary or avoid initializing ManagerRoot if Application.isPlaying is false.