Search Issue Tracker
Fixed
Votes
0
Found in [Package]
1.2.2
Issue ID
ADDR-1326
Regression
Yes
[Addressables] AssetReferenceDrawer does not mark object as dirty when setting reference to null
How to reproduce:
1. Create a new Unity project
2. Import the Addressables package, create Addressable settings and mark anything as Addressable
3. Search for the AssetReferenceDrawer.cs script and open it
4. Set some breakpoints at the beginning of SetObject() function and attach debugger to Unity
5. Create a new script and add a public UnityEngine.AddressableAssets.AssetReference variable
6. Attach this script to any GameObject
7. In the Inspector, click on the AssetReference field and select an addressable - code execution hits EditorUtility.SetDirty
8. In the Inspector, click on the AssetReference field and select 'None (AddressableAsset)'
Expected result: code execution eventually hits EditorUtility.SetDirty
Actual result: object is never set to dirty when setting the reference to null
Reproducible with: 2018.4.24f1, 2019.4.2f1, 2020.1.0b14, 2020.2.0a16 - Addressables 1.2.2, 1.11.2
Not reproducible with: 2018.4.24f1, 2019.4.2f1, 2020.1.0b14, 2020.2.0a16 - Addressables 1.1.10
Notes:
Before 1.1.10 and earlier SetObject() would call SetEditorAssetWithUndo() which would hit EditorUtility.SetDirty for null targets
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
- StackOverflowException occurs and tests fail to load when the Test Runner window is opened while System.Windows.Forms.dll and System.Deployment.dll are present in the project
- Some UXML Template Asset foldouts appear enabled when all fields inside are disabled
- URP Terrain Demo crash on burst_signal_handler after Generating lighting
- Project window button icons are poorly visible and their shades differ in Light theme
- Automatic LOD fails and SRP Batcher incompatibility occurs when using spline-based quad-topology meshes
Resolution Note:
https://github.cds.internal.unity3d.com/unity/Addressables/pull/465