Search Issue Tracker
Fixed in 5.6.0
Votes
0
Found in
5.5.0f3
Issue ID
857507
Regression
Yes
Crash in Transform::ClearTransformHierarchyAndApplyToSerializedData when applying changes to prefab
To reproduce:
1) Select PrefabEditPanel
2) Click "Create Prefab Instance" button two or more times. A prefab is added to Contents with each click.
3) Select the text object of one of the prefab instances and change the text value
4) Click "Apply" to change the SampleTextPrefab
Expected result: The prefab should be updated and all instances should change to the new text.
Actual result: Unity generates the following error messages in the log file and then crashes.
Prefab has multiple Transform components! Removing them automatically would not be safe.
UnityEditor.PrefabUtility:ReplacePrefab(GameObject, Object, ReplacePrefabOptions)
Assertion failed on expression: 'rootTransform != NULL'
UnityEditor.PrefabUtility:ReplacePrefab(GameObject, Object, ReplacePrefabOptions)
MissingReferenceException: The object of type 'RectTransform' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
at (wrapper managed-to-native) UnityEngine.Component:get_gameObject ()
at UnityEngine.Component.GetComponentsInParent[RectMask2D] (Boolean includeInactive, System.Collections.Generic.List`1 results) [0x00002] in C:\buildslave\unity\build\artifacts\generated\common\runtime\ComponentBindings.gen.cs:142
at UnityEngine.UI.MaskUtilities.GetRectMaskForClippable (IClippable clippable) [0x00017] in C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\MaskUtilities.cs:114
at UnityEngine.UI.MaskableGraphic.UpdateClipParent () [0x00018] in C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\MaskableGraphic.cs:203
at UnityEngine.UI.MaskableGraphic.OnEnable () [0x0000f] in C:\buildslave\unity\build\Extensions\guisystem\UnityEngine.UI\UI\Core\MaskableGraphic.cs:122
UnityEditor.PrefabUtility:ReplacePrefab(GameObject, Object, ReplacePrefabOptions)
Reproducible: 5.5.0b1, 5.5.0f3, 5.6.0a6
Not reproducible with 5.4.3p2
Regression introduced in 5.5
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