Search Issue Tracker
By Design
Votes
4
Found in
4.1.0f4
Issue ID
533867
Regression
No
AssetPostprocessor - OnPostprocessAllAssets fires duplicate 'import' notifications on 'Save Project'
AssetPostprocessor.OnPostprocessAllAssets fires two 'import' notifications for every dirty asset on 'Save Project'.
Reproduce:
1) Open attached sample project
2) 'Editor/AssetFileWatcher.cs' is the implementation of the custom AssetPostprocessor, which basically only Debug.Log's what has been processed.
3) Click 'File > Save Project'. Since no assets have been modifed yet, nothing is written to the Console.
4) Change 'Assets/New Material', so it gets marked as dirty in the editor. I changed the x-tiling value of the material.
5) Click 'File > Save Project'.
Observe that the AssetFileWatcher.OnPostprocessAllAssets() method has been called two times for the same asset, you should see two logs in the Console window that did output the same text.
Actually I expected to get only the 'imported' notification once for an asset, not multiple times. I guess this as a bug.
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
- [Android][Vulkan] Crash on /system/lib/libandroid.so (ANativeWindow_setBuffersGeometry+4) when the Vulkan Graphics API is used
- Event handlers are preventing operations when trying to copy or paste HTML text in the WebGL Player
- [macOS] Crash on __pthread_kill when Exporting a Package while another export is in progress
- Crash on TransformAccessDestroyCallback when removing a URP Decal Projector component from a parent GameObject that had a URP Decal Projector child GameObject
- [ShaderGraph][URP Sample] Shader error in 'Shader Graphs/Screen_Graph': 'SHADERGRAPH_BAKED_GI'
rhys_vdw
Jun 24, 2019 14:17
I am experiencing this issue in 2019.1.0f2. Two imports per project save.