Search Issue Tracker
By Design
Votes
0
Found in
2019.3.0f2
2019.3.0f4
Issue ID
1210674
Regression
Yes
OnPostprocessTexture isn't called when the asset matches a version that was previously imported
OnPostprocessTexture isn't always called
When a texture asset is modified, OnPostprocessAllAssets is always called when focussing the editor. However, OnPostprocessTexture isn't always called, sometimes it is, sometimes it isn't.
Repro steps:
1. Have an AssetPostprocessor that logs OnPostprocessAllAssets and OnPostprocessTexture.
2. Modify a texture asset externally.
3. Switch back to Unity (alt-tab or with mouse).
4. Repeat steps 2 and 3 as necessary.
Expected behavior: Both OnPostprocessAllAssets and OnPostprocessTexture should be called
Observed behavior: OnPostprocessAllAssets is always called, but OnPostprocessTexture isn't always called
The project in this report contains a postprocessor and an image which can be used to go through the repro steps.
Reproducible: 2019.3.0f5, 2020.1.0a19
Not repro: 2018.4.14f1, 2017.4.35f1,
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
- GameObjects change Hierarchy order when undoing adding Component to multiple GameObjectsGameObjects change Hierarchy order when undoing adding Component to multiple GameObjects
- [macOS] Editor crashes after entering Play mode with overlapping GameObjects with Cloth Component and Cloth Inter-Collision enabled
- Look Dev constantly regenerates the default Volume Profile when set to "None" instead of using the default one
- Look Dev errors are spammed when opening a new HDRP project when Look Dev was added to the layout in the previous project
- URP Scene Templates are not editable when first opened from the New Scene dialog
Resolution Note (2020.1.X):
If a post-processor is modifying the asset or creating additional artifacts, that modification will be saved and any additional artifacts are now saved in a local cache (until the editor is closed), so re-running the post-processor should not be needed.
This was also the case even before 2019.3 when using the cache server.
If some post-processors are depending on this callback to do some side-effects, it's actually wrong because importers should ideally not have side-effects and those would be anyway impacted in the future by running imports on a separate worker process, for example.
OnPostprocessAllAssets runs on the main thread and is always called, so that would be the place for side-effects to be executed.