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

Asset - Importers

-

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

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.