From 5c8e593d89dc8d2920256fe3736fa856236b9ae4 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Tue, 2 Dec 2025 18:33:43 +0200 Subject: [PATCH] Show properties without getter in generic editor --- Source/Editor/CustomEditors/Editors/GenericEditor.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Editor/CustomEditors/Editors/GenericEditor.cs b/Source/Editor/CustomEditors/Editors/GenericEditor.cs index a20b41f8c..3512bcc38 100644 --- a/Source/Editor/CustomEditors/Editors/GenericEditor.cs +++ b/Source/Editor/CustomEditors/Editors/GenericEditor.cs @@ -247,7 +247,7 @@ namespace FlaxEditor.CustomEditors.Editors /// The items. protected virtual List GetItemsForType(ScriptType type) { - return GetItemsForType(type, type.IsClass, true); + return GetItemsForType(type, type.IsClass, true, true); } /// @@ -273,10 +273,14 @@ namespace FlaxEditor.CustomEditors.Editors var attributes = p.GetAttributes(true); var showInEditor = attributes.Any(x => x is ShowInEditorAttribute); - // Skip properties without getter or setter + // Skip properties without getter if (!p.HasGet || (!p.HasSet && !showInEditor && !usePropertiesWithoutSetter)) continue; + // Skip getter-only properties declared in built-in types + if (!p.HasSet && usePropertiesWithoutSetter && p.Type.DeclaringType.Assembly == typeof(Editor).Assembly) + continue; + // Skip hidden fields, handle special attributes if ((!p.IsPublic && !showInEditor) || attributes.Any(x => x is HideInEditorAttribute)) continue;