Search Issue Tracker
Won't Fix
Votes
1
Found in
5.0.0b15
Issue ID
666896
Regression
No
When a prefab is instantiated and HideFlags.DontSave is applied, an error appears regarding the transform of all children
To reproduce:
- open the project
- hit play
- notice the object is spawned
- hit play again to stop, see error log:
Can't destroy Transform component of 'x'. If you want to destroy the game object, please call 'Destroy' on the game object instead. Destroying the transform component is not allowed.
Remove the line "m_Object.hideFlags = HideFlags.DontSave;" from TestSpawn.cs and the error won't appear.
Reproduced on: 5.6.0a2, 5.5.0b11
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Add comment