Unity-Technologies/UnityCsReference · error · NotImplementedException
Don't know how to display value.
Error message
Don't know how to display value.
What it means
Thrown when DefaultPluginImporterExtension.OnGUI encounters a property whose Type is not one of the handled primitives (bool, enum, string). The inspector only knows how to render a closed set of types via EditorGUILayout; anything else raises NotImplementedException.
Source
Thrown at Editor/Mono/Modules/DefaultPluginImporterExtension.cs:87
internal virtual void Apply(PluginImporterInspector inspector)
{
string valueString = type == typeof(bool) ? value.ToString().ToLower() : value.ToString();
inspector.importer.SetPlatformData(platformName, key, valueString);
}
internal virtual void OnGUI(PluginImporterInspector inspector)
{
if (type == typeof(bool)) value = EditorGUILayout.Toggle(name, (bool)value);
else if (type.IsEnum)
{
if (type.IsDefined(typeof(FlagsAttribute), false))
value = EditorGUILayout.EnumFlagsField(name, (Enum)value);
else
value = EditorGUILayout.EnumPopup(name, (Enum)value);
}
else if (type == typeof(string)) value = EditorGUILayout.TextField(name, (string)value);
else throw new NotImplementedException("Don't know how to display value.");
}
}
internal bool propertiesRefreshed = false;
public DefaultPluginImporterExtension(Property[] properties)
{
this.properties = properties;
}
protected virtual Property[] GetPropertiesForInspector(PluginImporterInspector inspector)
{
return properties;
}
public virtual void ResetValues(PluginImporterInspector inspector)
{
hasModified = false;View on GitHub (pinned to 225b0fbdb5)
Solutions
- Subclass DefaultPluginImporterExtension and override OnGUI to add handling for the custom type before calling base.OnGUI.
- Change the Property type to a supported primitive (bool, enum, or string) in the plugin's metadata.
- If the property is not user-editable, remove it from GetPropertiesForInspector so it is never rendered.
Example fix
// before
else if (type == typeof(string)) value = EditorGUILayout.TextField(name, (string)value);
else throw new NotImplementedException("Don't know how to display value.");
// after: extend the dispatch
else if (type == typeof(float)) value = EditorGUILayout.FloatField(name, (float)value);
else if (type == typeof(int)) value = EditorGUILayout.IntField(name, (int)value);
else throw new NotImplementedException($"Don't know how to display value of type {type}."); Defensive patterns
Strategy: validation
Validate before calling
static readonly HashSet<Type> k_Supported = new(){ typeof(bool), typeof(string) };
bool CanDisplay(Type t) => k_Supported.Contains(t) || t.IsEnum; Type guard
static bool IsInspectableProperty(Type type) =>
type == typeof(bool) || type.IsEnum || type == typeof(string); Try / catch
try { inspector.OnGUI(); }
catch (NotImplementedException) { /* hide the unsupported property row */ } Prevention
- Restrict plugin Property types to bool/enum/string.
- Override OnGUI to extend the dispatch table for custom types.
When it happens
Trigger: A native plugin declares a Property whose Type is, e.g., int, float, Vector3, double, or any custom/struct type, and the plugin importer inspector tries to render it. OnGUI dispatches through if/else chains and hits the final else.
Common situations: Third-party or custom platform plugin returns properties with numeric or struct types that the default inspector GUI does not support. Plugin SDK version change introduces a new property type.
Related errors
- Unexpected mixed value for '{assetPath}', platform: {platfor
- path
- paths
- Cannot call ReportAssetChanged outside of the OnAssetsModifi
- Cannot add dependency on invalid path.
AI-assisted analysis of Unity-Technologies/UnityCsReference@225b0fbdb5 (2026-08-13).
Data as JSON: /api/errors/a198b34935f7c767.
Report an issue: GitHub.