Search Issue Tracker

By Design

Votes

3

Found in

2020.3

2020.3.10f1

2021.1

2021.2

Issue ID

1339347

Regression

No

Changes made in AssetPostprocessor.OnPostprocessPrefab are not visible in the saved prefab

Asset - Importers

-

How to reproduce:
1. Open the attached project "Test2020LTS.zip"
2. Open SampleScene
3. Edit the text of Text (TMP) Game Object
4. Drag the Canvas component to the Project View to create a prefab
5. Open the created prefab

Expected result: You see 'Hello World!' in the saved prefab
Actual result: You can see the edited text in the saved prefab

Reproducible with: 2020.3.11f1, 2021.1.10f1, 2021.2.0a19
Could not test with: 2018.4.34f1, 2019.4.28f1 (No OnPostprocessPrefab method)

  1. Resolution Note (2022.1.X):

    This behavior is by design. In the documentation we have "This function is called before the imported Prefab is created in the Library folder and before it is written to disk" => the imported Prefab that is saved in Library folder contains all the changes made in OnPostprocessPrefab, but the original asset remains unchanged.

    Prefab Mode (isolation) displays the prefab asset as it is the Assets folder which doesn't contain the changes made by OnPostprocessPrefab

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.