Copyright © 2026 Unity Technologies
This issue was brought up on the forum here: https://discussions.unity.com/t/built-in-dictionary-serialization-and-authoring-in-unity-6-6-alpha/1722926/105
Description
LoadableDrawer does not support Loadable<T> stored in a natively serialized Dictionary<,> field. As soon as the inspector has to draw a dictionary entry, the property drawer throws a NullReferenceException and the entry's value cell fails to build, so the dictionary is effectively unusable in the inspector.
The drawer resolves the Loadable<T> generic argument by hand-walking the propertyPath and only understands Array.data[...] segments belonging to arrays and lists. Dictionary entries add a .key / .value segment after Array.data[N], which the walk does not handle.
Reproduction steps
Create a MonoBehaviour or ScriptableObject with:
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using Unity.Loading;
public class LoadableDictRepro : MonoBehaviour
{ [SerializeField] Dictionary<GUID, Loadable<Object>> _loadableDict; }Add the component to a GameObject and select it.
Add an entry to _loadableDict with the dictionary drawer's + button.
Expected: a new row with a key field and a Loadable<Object> object field (filtered to Object), exactly as for List<Loadable<Object>>.
Actual: NullReferenceException is thrown; the value cell is not created.
{{
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.LoadableDrawer.FindLoadableType (UnityEditor.SerializedProperty property)
UnityEditor.LoadableDrawer.CreatePropertyGUI (UnityEditor.SerializedProperty property)
UnityEditor.UIElements.PropertyField.ResetInternal (UnityEditor.SerializedProperty newProperty)
UnityEditor.UIElements.PropertyField.Reset (UnityEditor.SerializedProperty newProperty)}}
Issues you vote on will appear here