Skip indexed properties in generic editor
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user