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
- Render Pipeline Converter selected asset counter reports one fewer item when using manual selection
- [Android] [Adreno] [WebGL] A light cookie is not rendered with shader compile error when WebGL build is launched on a device with Adreno GPU
- Rigibody sliding over a flat surface that is made of several GameObjects detects false collisions when Collision Detection is set to "Continuous" or "Continuous Dynamic"
- UI Toolkit Label height is incorrectly calculated when using max-width with percentage value
- Visual Effect Material causes Scene view to update continuously when both Scene and Game views are open, despite "Always Refresh" being disabled
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.