3.0 - unitypackage

This commit is contained in:
monitor1394
2022-01-05 21:40:48 +08:00
parent c160867765
commit 228a4b2840
846 changed files with 105 additions and 467693 deletions

View File

@@ -0,0 +1,35 @@
using UnityEditor;
namespace XCharts.Editor
{
[ComponentEditor(typeof(Vessel))]
public class VesselEditor : MainComponentEditor<Vessel>
{
public override void OnInspectorGUI()
{
++EditorGUI.indentLevel;
var shape = (Vessel.Shape)baseProperty.FindPropertyRelative("m_Shape").intValue;
PropertyField("m_Shape");
PropertyField("m_ShapeWidth");
PropertyField("m_Gap");
PropertyTwoFiled("m_Center");
PropertyField("m_BackgroundColor");
PropertyField("m_Color");
PropertyField("m_AutoColor");
switch (shape)
{
case Vessel.Shape.Circle:
PropertyField("m_Radius");
PropertyField("m_Smoothness");
break;
case Vessel.Shape.Rect:
PropertyField("m_Width");
PropertyField("m_Height");
PropertyField("m_CornerRadius");
break;
}
--EditorGUI.indentLevel;
}
}
}