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
- A pink line of the size of the Tree is drawn in the Hierarchy when opening any dropdown in the Inspector
- 2D physics makes object movements to flicker
- Fatal Error "Callback registration failed. Increase kMaxCallback." when playing multiple random audio sources rapidly
- 2D Light overlap order is not evaluated when shadows are being produced with Render Graph Compatibility Mode Disabled
- Short pause between loops in a WebGL-built project when looping an AudioSource
Resolution Note:
https://github.cds.internal.unity3d.com/unity/Addressables/pull/465