From 31a446cfab8e4fbfc809555346eec00ed7f61ff8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Perrier Date: Tue, 11 May 2021 14:57:07 +0200 Subject: [PATCH] Fix getter only properties not showing. --- Source/Editor/CustomEditors/Editors/GenericEditor.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/Editor/CustomEditors/Editors/GenericEditor.cs b/Source/Editor/CustomEditors/Editors/GenericEditor.cs index 179f5b935..fdbf75d1c 100644 --- a/Source/Editor/CustomEditors/Editors/GenericEditor.cs +++ b/Source/Editor/CustomEditors/Editors/GenericEditor.cs @@ -258,13 +258,12 @@ namespace FlaxEditor.CustomEditors.Editors for (int i = 0; i < properties.Length; i++) { var p = properties[i]; - - // Skip properties without getter or setter - if (!p.HasGet || !p.HasSet) - continue; - var attributes = p.GetAttributes(true); + // Skip properties without getter or setter + if (!p.HasGet || (!p.HasSet && !attributes.Any(x => x is ShowInEditorAttribute))) + continue; + // Skip hidden fields, handle special attributes if ((!p.IsPublic && !attributes.Any(x => x is ShowInEditorAttribute)) || attributes.Any(x => x is HideInEditorAttribute)) continue;