Fix: error during build

This commit is contained in:
AnnulusGames 2023-12-03 08:38:11 +09:00
parent 6380011882
commit ffed2a3896
2 changed files with 3 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -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)