From ffed2a3896c412acabfd400482c8f7dc124b5889 Mon Sep 17 00:00:00 2001 From: AnnulusGames Date: Sun, 3 Dec 2023 08:38:11 +0900 Subject: [PATCH] Fix: error during build --- Alchemy/Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs | 3 ++- .../Assets/Alchemy/Runtime/Inspector/InspectorAttributes.cs | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Alchemy/Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs b/Alchemy/Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs index 2de0728..e304af6 100644 --- a/Alchemy/Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs +++ b/Alchemy/Assets/Alchemy/Editor/BuiltinAttributeDrawers.cs @@ -220,7 +220,8 @@ namespace Alchemy.Editor.Drawers { var att = (HorizontalLineAttribute)Attribute; var parent = Element.parent; - var line = GUIHelper.CreateLine(att.Color, EditorGUIUtility.standardVerticalSpacing * 4f); + var lineColor = att.Color == default ? GUIHelper.LineColor : att.Color; + var line = GUIHelper.CreateLine(lineColor, EditorGUIUtility.standardVerticalSpacing * 4f); parent.Insert(parent.IndexOf(Element), line); } } diff --git a/Alchemy/Assets/Alchemy/Runtime/Inspector/InspectorAttributes.cs b/Alchemy/Assets/Alchemy/Runtime/Inspector/InspectorAttributes.cs index ef6462d..a001ec8 100644 --- a/Alchemy/Assets/Alchemy/Runtime/Inspector/InspectorAttributes.cs +++ b/Alchemy/Assets/Alchemy/Runtime/Inspector/InspectorAttributes.cs @@ -1,5 +1,4 @@ using System; -using UnityEditor; using UnityEngine; using UnityEngine.UIElements; @@ -135,7 +134,7 @@ namespace Alchemy.Inspector { public HorizontalLineAttribute() { - Color = EditorGUIUtility.isProSkin ? new Color(0.4f, 0.4f, 0.4f) : new Color(0.6f, 0.6f, 0.6f); + Color = default; } public HorizontalLineAttribute(float r, float g, float b)