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
- Undoing Animator Parameter name change breaks references to it
- Crash on BV4_OverlapBoxAll when moving in play mode
- Custom mesh water surface normal map fades out when Y Position increases
- Sprite renderer does not issue draw calls correctly when using SRP Batcher
- [Android] Flickering artifacts when using "ScriptableRenderer.EnqueuePass(RenderPassEvent.BeforeRenderingPostProcessing)" multiple times
Resolution Note:
https://github.cds.internal.unity3d.com/unity/Addressables/pull/465