Skip indexed properties in generic editor

This commit is contained in:
David Svez
2026-08-03 05:25:36 -05:00
committed by Wojtek Figat
parent a67ff38ed5
commit 042c3b7220
@@ -270,6 +270,12 @@ namespace FlaxEditor.CustomEditors.Editors
for (int i = 0; i < properties.Length; i++)
{
var p = properties[i];
// Indexed properties require arguments and cannot be represented by a normal property row.
// Trying to read one (for example IList.Item[index]) throws TargetParameterCountException.
if (p.Type is PropertyInfo managedProperty && managedProperty.GetIndexParameters().Length != 0)
continue;
var attributes = p.GetAttributes(true);
var showInEditor = attributes.Any(x => x is ShowInEditorAttribute);