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
- Crash on mono_class_inflate_generic_method_full_checked when accessing static properties or methods of a Generic Interface in a Generic Class
- Crash on RendererScene::NotifyInvisible when switching QualitySettings of the HDRP pipeline asset in a specific project
- Compute and graphics queues are not run asynchronously when asynchronous compute shaders are enabled in DX12
- Unity Version Control window during "Create workspace" updates only when the mouse is moved
- Crash on AudioMixer::GetFloat when entering Play Mode in a specific project
Resolution Note:
https://github.cds.internal.unity3d.com/unity/Addressables/pull/465