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
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)
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
- Deleting multiple Tags throws “NullReferenceException”, and "Retrieving array element that was out of bounds" errors when holding the Enter key
- Material Component has two horizontal lines under it when its foldouts are closed
- Some selected Mesh Renderer Materials lead to Assets folder when pinged
- Editor colors appear darkened out when HDR Display Output is enabled
- Default Mesh Renderer Material cannot be found in the Select Material window after removing it from the GameObject
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