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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
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