Search Issue Tracker
Won't Fix
Votes
1
Found in
2018.4
2019.4
2020.2
2020.3
2020.3.2f1
2021.1
2021.2
Issue ID
1325788
Regression
No
Multiple errors appear in the Console when closing a Scene that contains nested Prefab with HideFlags set to DontSave
How to reproduce:
1. Open the user's attached project
2. In the top bar menu select BugRepro > Reproduce Bug Step 1
3. Select BugRepro > Reproduce Bug Step 2
4. Observe the Console
Expected result: No visible errors present
Actual result: Multiple errors appear in the Console
Reproducible with: 2018.4.33f1, 2019.4.24f1, 2020.2.7f1, 2020.3.3f1, 2021.1.2f1, 2021.2.0a7
Notes:
- The following error appears in the Console:
Cannot destroy GameObject that is part of a prefab instance.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Can't remove TestScript2 (Script) because TestScript1 (Script) depends on it
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Can't destroy Transform component of 'Sphere'. If you want to destroy the game object, please call 'Destroy' on the game object instead. Destroying the transform component is not allowed.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
The following scene GameObjects were found:
Sphere
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
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
- Rigidbody2D.Slide API does not have the needed configuration when creating a 2D Top-Down character controller
- Opening reference for "Playables"component redirects to a missing page
- Sprite Renderer image is changed when switching Mask Interaction and changing Sprite to a shared Sprite
- An unsigned integer is not compared with an integer correctly in player when using IL2CPP backend
- Graphical artifacts are being rendered in Scenes that are loaded during run-time when GPU Resident Drawer is turned on
Resolution Note (2021.2.X):
You must manually apply the flag to the entire hierarchy of game objects you desire to affect.
For Prefab instances in a scene you can set the hideflag on the Prefab instance handle object as a way to set the same hideflags on all the objects of the the Prefab instance (see PrefabUtility.GetPrefabInstanceHandle).