How to reproduce:
- Open the attached “WillDeleteAsset.zip“ project
- In the Project window, delete the asset named Test 1.prefab
- Observe the Console
- Select the Test.prefab asset and duplicate it (Ctrl+D / Cmd+D)
- Observe the Console
Actual result: The Console logs two "Delete cs: Assets/Test 1.prefab" warnings. "OnWillDeleteAsset" is triggered again during the duplication step
Expected result: "OnWillDeleteAsset" is not triggered during asset duplication. The Console should only log the warning once for the initial manual deletion
Reproducible with: 6000.0.0f1, 6000.0.78f1, 6000.3.18f1, 6000.4.12f1, 6000.5.1f1, 6000.6.0a7
Reproducible on: Windows 10 (by user), Windows 11
Not reproducible on: No other environments tested
Workaround: Add a check inside the OnWillDeleteAsset callback to verify if the file or directory actually exists on the disk before executing any custom logic
Notes:
- Second warning will collapse into the first one with a badge count of 2 if "Collapse" is enabled
- The issue persists until the next assembly reload. Once the assembly reloads, duplicating "Test.prefab" no longer triggers the phantom delete callback