Search Issue Tracker
Fixed in 2022.1.X
Fixed in 2019.4.X, 2020.3.X, 2021.1.X, 2021.2.X
AssetModificationProcessor is not notified when an asset is duplicated
Steps to reproduce:
1. Open user attached project
2. Create any type of asset (a Material for instance) in the assets
3. Notice the console logged the creation of the asset file and the creation of the associated meta file
4. Duplicate an asset
5. Notice nothing is logged in the console, AssetModificationProcessor.OnWillCreateAsset is not called
Expected result: AssetModificationProcessor.OnWillCreateAsset is called when duplicating an asset
Actual result: AssetModificationProcessor.OnWillCreateAsset is not called when duplicating an asset
Reproduced in: 2017.3.0a7, 2017.2.0b11, 2017.1.1p1, 5.6.3p3, 5.5.4p4
Jul 09, 2019 08:28
I am affected by this as well and don't know how to work around this issue. I need to keep track of custom metadata for specific assets. There are callbacks for all of the other operations: create, save, move, delete, everything works fine except this special case when users duplicate an asset, which happens pretty often because it's one of the fastest ways to create new assets.
Oct 18, 2017 17:31
I have this issue too, it's pretty annoying trying to keep an asset manifest.
As a workaround, I used OnWillSaveAssets and wait for the asset to be saved, but this is not a good enough solution because the OnWillSaveAssets could be called ages into the future. Any ideas on how to fix it until Unity get's around to it?
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- NullReferenceException error thrown when changing Scenes in Play Mode
- Crash on "'anonymous namespace'::ConvertFBXShapes" when importing an FBX file
- Crash on Transform::RemoveFromParent when Object.DestroyImmediate() is called on Transform
- [Linux] Player consumes more CPU resources when it is running in the background
- Save process is triggered every time when prefab property values are changed by dragging
Resolution Note (fix version 2022.1):
This particular case has been investigated thoroughly and we have decided, in the interests of protecting the stability and features of Unity for users that rely upon the affected versions, to not address this fix for the time being. We understand that this will cause problems for some users, and so may address in a future version.
Resolution Note (fix version 2021.2):
Fixed in 2021.2.0b6