Error rendering drawer for List<AssetReferenceGameObject>

Issue #417 resolved
Kevin Mettes created an issue

1 What happened?
Using the Addressable Asset System 0.3.5 with a ScriptableObject class which contains a List<AssetReferenceGameObject> it errors after adding 1 element.

Error rendering drawer for AssetReference property List.Array.data[0].
System.Reflection.MethodBase:Invoke(Object, Object[])
Sirenix.OdinInspector.Editor.<>c__DisplayClass16_0:<.cctor>b__3(Object, Rect, SerializedProperty, GUIContent, Boolean) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyValueEntry.cs:549)
Sirenix.OdinInspector.Editor.UnityPropertyHandlerUtility:PropertyHandlerOnGUI(Object, Rect, SerializedProperty, GUIContent, Boolean) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyValueEntry.cs:315)
Sirenix.OdinInspector.Editor.AbstractTypeUnityPropertyDrawer`3:DrawPropertyLayout(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyValueEntry.cs:148)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.NullableReferenceDrawer`1:DrawPropertyLayout(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/QuaternionDrawer.cs:62)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.ReferenceValueConflictDrawer`1:DrawPropertyLayout(GUIContent)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.ReferencePathConflictDrawer`1:DrawPropertyLayout(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/ValueDropdownAttributeDrawer.cs:64)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.FixUnityNullDrawer`1:DrawPropertyLayout(GUIContent)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.ReferenceDrawer`1:DrawPropertyLayout(GUIContent)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.PropertyContextMenuDrawer`1:DrawPropertyLayout(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/OnValueChangedAttributeDrawer.cs:83)
Sirenix.OdinInspector.Editor.OdinDrawer:DrawProperty(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:133)
Sirenix.OdinInspector.Editor.InspectorProperty:Draw(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/PropertyRangeAttributeDrawer.cs:684)
Sirenix.OdinInspector.Editor.Drawers.CollectionDrawer`1:DrawItem(InspectorProperty, DragHandle, Int32) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/ColorDrawer.cs:90)
Sirenix.OdinInspector.Editor.Drawers.CollectionDrawer`1:DrawItems() (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/ColorDrawer.cs:77)
Sirenix.OdinInspector.Editor.Drawers.CollectionDrawer`1:DrawPropertyLayout(GUIContent)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.NullableReferenceDrawer`1:DrawPropertyLayout(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Value Drawers/QuaternionDrawer.cs:62)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.ReferenceValueConflictDrawer`1:DrawPropertyLayout(GUIContent)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.ReferencePathConflictDrawer`1:DrawPropertyLayout(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/ValueDropdownAttributeDrawer.cs:64)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.FixUnityNullDrawer`1:DrawPropertyLayout(GUIContent)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.ReferenceDrawer`1:DrawPropertyLayout(GUIContent)
Sirenix.OdinInspector.Editor.OdinDrawer:CallNextDrawer(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:181)
Sirenix.OdinInspector.Editor.Drawers.PropertyContextMenuDrawer`1:DrawPropertyLayout(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/OnValueChangedAttributeDrawer.cs:83)
Sirenix.OdinInspector.Editor.OdinDrawer:DrawProperty(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:133)
Sirenix.OdinInspector.Editor.InspectorProperty:Draw(GUIContent) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/PropertyRangeAttributeDrawer.cs:684)
Sirenix.OdinInspector.Editor.InspectorUtilities:DrawPropertiesInTree(PropertyTree) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Utilities/PersistentContext/PersistentContextCache.cs:243)
Sirenix.OdinInspector.Editor.PropertyTree:Draw(Boolean) (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Drawers/Attribute Drawers/InlineEditorAttributeDrawer.cs:397)
Sirenix.OdinInspector.Editor.OdinEditor:DrawTree() (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyValueEntry.cs:185)
Sirenix.OdinInspector.Editor.OdinEditor:DrawOdinInspector()
Sirenix.OdinInspector.Editor.OdinEditor:OnInspectorGUI() (at D:/Sirenix/Sirenix Solution/Sirenix.OdinInspector.Editor/Core/Value Entries/PropertyValueEntry.cs:173)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

2 How can we reproduce it?

Use Unity 2018.2.6f1 and create a new project
Edit the manifest.json in the Packages folder
Add "com.unity.addressables": "0.3.5-preview" to the list for the Addressable Asset System package
Use this script

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;

[CreateAssetMenu]
public class ListOfReferences : ScriptableObject
{
    public List<AssetReferenceGameObject> List = new List<AssetReferenceGameObject>();
}

Create a scriptable object in the project using the menu
Add an element to the list using the inspector
And then the console is getting flooded with the error.

3 What version of Unity are you using?
2018.2.6f1

4 What version of Odin are you using? (See "Tools > Odin Inspector > About")
2.0.3

5 Do you have Editor Only mode enabled?
No

6 What operating system are you on?
Windows 10 Pro x64

Comments (1)

  1. Log in to comment