Search Issue Tracker

Fixed in 2022.1.X

Fixed in 2019.4.X, 2020.3.X, 2021.1.X, 2021.2.X

Votes

9

Found in

2017.1.1f1

Issue ID

949423

Regression

No

AssetModificationProcessor is not notified when an asset is duplicated

Asset - Database

-

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

  1. 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.

  2. Resolution Note (fix version 2021.2):

    Fixed in 2021.2.0b6

Comments (2)

  1. Xarbrough

    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.

  2. Fydar

    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?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.