Search Issue Tracker
Fixed in 5.5.3
Votes
0
Found in
5.4.0p2
Issue ID
825571
Regression
Yes
Accessing transform.hasChanged flag in OnBeforeSerialize crashes on prefab creation
Steps to reproduce the issue:
1. Open attached project.
2. Open scene named "Crash".
3. Drag and drop game object named "PREFAB_ME" from the "Hierarchy" window to the "Project" window (to make it prefab).
Actual result:
The Editor crashes on prefab creation.
Expected result:
The Editor should not crash on prefab creation.
Reproduced with:
5.4.0b25, 5.4.0f3, 5.4.0p2, 5.5.0a6.
Cannot reproduce with:
5.1.5f1, 5.2.5f1, 5.3.5f1, 5.3.6p3.
The crash occurs when reseting transform.hasChanged flag in OnBeforeSerialize of ISerializationCallbackReceiver interface. These lines of code produces the crash:
public void OnBeforeSerialize() {
if (transform.hasChanged) {
transform.hasChanged = false;
}
}
The crash does not occur after removing the script named "AddComponent".
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [VFX Graph] ArcCone Direction computation is wrong in Base Mode
- [Android] [Galaxy Tab] A singular Pen touch logs a Pen touch event and a singular finger touch event when logged using "VisualElement.RegisterCallback" with "Pointer(Up/Down)Event"
- Crash on D3D12DescriptorCache::Deallocate or vkGetInstanceProcAddr when loading RenderDoc in a specific Scene
- [HDRP] Lit material preview is rendered incorrectly with a mask map
- The "LerpWhiteTo" missing function displays an error when the Shadows.hlsl shader is included in a Shader file
Add comment