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
- URP Package documentation link in Package manager leads to the deprecated page
- [Usability] No setup script for Render Pipeline Assets for the proper URP Sample usage
- csc.rsp -additionalfile files are not treated as dependencies and are not reloaded when the file contents change
- Error ‘cannot use casts on l-values’ when a variable is assigned inside a second-level nested if statement before being used in a conversion
- "You cannot save to an invalid folder" warning dialog box is shown when canceling Tile Palette creation
Resolution Note:
https://github.cds.internal.unity3d.com/unity/Addressables/pull/465