When I inspect my Addressable Asset Settings file, I get the following exception:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.AddressableAssets.GUI.AddressableAssetSettingsInspector.OnInspectorGUI () (at ./Library/PackageCache/com.unity.addressables@1.21.2/Editor/GUI/AddressableAssetSettingsInspector.cs:271)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass71_0.b__0 () (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Also, when I go to “Window/Asset Management/Addressables Groups” it doesn’t recognize my settings asset and prompts me to create a new addressables settings asset.
I’ve bug reported a simple repro case by moving my addressables data files to a new project-
CASE IN-30313
Just out of curiosity, how does Addressables know where the settings file is, or what settings file to use? I don’t see a place to specify the settings file in Project Settings.
1 Like
I get similar Addressable GUI error when I upgrade project from 2021.3 to 2022.1 or 2022.2
I also got this when upgrading from 2021.3 to 2022.2
1 Like
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.AddressableAssets.Settings.AddressableAssetGroup.get_entries () (at ./Library/PackageCache/com.unity.addressables@1.21.2/Editor/Settings/AddressableAssetGroup.cs:344)
UnityEditor.AddressableAssets.Settings.AddressableAssetGroup.get_currentHash () (at ./Library/PackageCache/com.unity.addressables@1.21.2/Editor/Settings/AddressableAssetGroup.cs:405)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.get_groupsHash () (at ./Library/PackageCache/com.unity.addressables@1.21.2/Editor/Settings/AddressableAssetSettings.cs:866)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.get_currentHash () (at ./Library/PackageCache/com.unity.addressables@1.21.2/Editor/Settings/AddressableAssetSettings.cs:883)
UnityEditor.AddressableAssets.Settings.AddressableAssetSettings+Cache2[T1,T2].IsValid () (at ./Library/PackageCache/com.unity.addressables@1.21.2/Editor/Settings/AddressableAssetSettings.cs:66) UnityEditor.AddressableAssets.Settings.AddressableAssetSettings+Cache
2[T1,T2].TryGetCached (T1 key, T2& result) (at ./Library/PackageCache/com.unity.addressables@1.21.2/Editor/Settings/AddressableAssetSettings.cs:48)
UnityEditor.AddressableAssets.GUI.AddressableAssetInspectorGUI.GatherTargetInfos (UnityEngine.Object[ ] targets, UnityEditor.AddressableAssets.Settings.AddressableAssetSettings aaSettings) (at ./Library/PackageCache/com.unity.addressables@1.21.2/Editor/GUI/AssetInspectorGUI.cs:254)
UnityEditor.AddressableAssets.GUI.AddressableAssetInspectorGUI.OnPostHeaderGUI (UnityEditor.Editor editor) (at ./Library/PackageCache/com.unity.addressables@1.21.2/Editor/GUI/AssetInspectorGUI.cs:121)
UnityEditor.Editor.DrawHeader () (at <21ea535ef5234f85ad42068513cea80c>:0)
UnityEditor.UIElements.EditorElement.DrawEditorLargeHeader (UnityEditor.Editor[ ] editors, System.Boolean& wasVisible) (at <21ea535ef5234f85ad42068513cea80c>:0)
UnityEditor.UIElements.EditorElement.DrawEditorHeader (UnityEditor.Editor[ ] editors, UnityEngine.Object target, System.Boolean& wasVisible) (at <21ea535ef5234f85ad42068513cea80c>:0)
UnityEditor.UIElements.EditorElement.HeaderOnGUI () (at <21ea535ef5234f85ad42068513cea80c>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <23fa3ef03df84815b9056a2460aea020>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Hi all thanks for reporting this issue. The guid of the settings file is stored in Assets\AddressableAssetsData\DefaultObject.asset. As a workaround, you can paste in the correct guid and it should refresh the Groups window.
Unable to change GUID
Even in the Inspector in debug mode, the UI for changing the GUID does not appear properly.
Changing the data in the .Asset file directly does not solve the problem.
A problem occurred during the update process of 2021.3 → 2022.2
1 Like
I solved the problem
Reimport All
Reimport All
Reimport All
crashes crashes crashes
Unity rerun rerun rerun…
It seems that the problem has been solved in the process.
Reimport process has never been completed properly.
The screen turned white and forced the program to rerun.
Every time I do Reimport All,
The missing parts were fixed one by one, so it was solved after several times.
It’s very disturbing.
Getting the same issue, i deleted all addressables config, recreated everything, works fine for a bit, couple days later I open unity and boom all the assets are corrupted again.
Reimport everything 16 times works to a point, but always theres some files broken left over.
1 Like
ageana
August 10, 2023, 8:13am
9
Still getting this in Unity 2022.3.6f1 with addressables package 1.21.15
The changelog in 1.21.15 claims to have this fixed, but it doesn’t seem to be.
1 Like