From 4148d814bd468f5bd8b0c29be95be75cb71da31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mi=C5=82osz=20Matkowski?= Date: Mon, 9 Sep 2024 01:10:31 +0200 Subject: [PATCH] Minor refactor changes --- .../Editor/ToolboxPropertyHandler.cs | 1 - .../Editor/Utilities/PropertyUtility.cs | 15 ++++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Assets/Editor Toolbox/Editor/ToolboxPropertyHandler.cs b/Assets/Editor Toolbox/Editor/ToolboxPropertyHandler.cs index fd1b763e..a2d9b97d 100644 --- a/Assets/Editor Toolbox/Editor/ToolboxPropertyHandler.cs +++ b/Assets/Editor Toolbox/Editor/ToolboxPropertyHandler.cs @@ -117,7 +117,6 @@ internal ToolboxPropertyHandler(SerializedProperty property) ProcessToolboxData(); } - private void ProcessBuiltInData() { var attributes = fieldInfo.GetCustomAttributes(); diff --git a/Assets/Editor Toolbox/Editor/Utilities/PropertyUtility.cs b/Assets/Editor Toolbox/Editor/Utilities/PropertyUtility.cs index 63aed9ae..f432b958 100644 --- a/Assets/Editor Toolbox/Editor/Utilities/PropertyUtility.cs +++ b/Assets/Editor Toolbox/Editor/Utilities/PropertyUtility.cs @@ -9,8 +9,13 @@ namespace Toolbox.Editor { - public static partial class PropertyUtility + public static class PropertyUtility { + internal static class Defaults + { + internal static readonly string scriptPropertyName = "m_Script"; + } + //NOTE: last non-reflection implementation was ok but support for [SerializeReference] makes it a bit slow // unfortunately UnityEditor.ScriptAttributeUtility.GetFieldInfoFromProperty is internal so we have to retrive it using reflection private static readonly MethodInfo getGetFieldInfoFromPropertyMethod = @@ -440,14 +445,6 @@ public static void OverrideLabelByValue(GUIContent label, SerializedProperty pro } } - internal static class Defaults - { - internal static readonly string scriptPropertyName = "m_Script"; - } - } - - public static partial class PropertyUtility - { public static SerializedProperty GetSibling(this SerializedProperty property, string propertyPath) { var propertyParent = property.GetParent();