Search Issue Tracker
By Design
Votes
0
Found in
2020.3
2021.2
2021.2.0a14
Issue ID
1332381
Regression
No
AssetPostprocessor.OnPostprocessPrefab() is not called when removing components
How to reproduce:
1. Open attached project "OnPostprocessPrefabIssue-2021.2.zip"
2. Select "Assets/Cube.prefab" in Project window
3. Remove "Box Collider" in the Inspector
Expected result: OnPostprocessPrefab() should is called when removing the component
Actual result: OnPostprocessPrefab() is not called when removing the component
Reproducible with - 2020.3.7f1, 2021.1.5f1, 2021.2.a16
Not reproducible with (no AssetPostprocessor.OnPostprocessPrefab) - 2018.4, 2019.4
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
- 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
Resolution Note:
Works as designed. It can be considered unintuitive, but it's because the Asset Database recognizes it has seen this state of the prefab before and restores it. This is done for performance reasons to avoid triggering long dependency chains of prefabs.