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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
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.