Files
XCharts/Editor/PropertyDrawers/VesselDrawer.cs

36 lines
1.3 KiB
C#
Raw Normal View History

2021-01-11 08:54:28 +08:00
/************************************************/
/* */
/* Copyright (c) 2018 - 2021 monitor1394 */
/* https://github.com/monitor1394 */
/* */
/************************************************/
2020-07-06 08:41:28 +08:00
using UnityEditor;
using UnityEngine;
namespace XCharts
{
[CustomPropertyDrawer(typeof(Vessel), true)]
2021-01-11 08:54:28 +08:00
public class VesselDrawer : BasePropertyDrawer
2020-07-06 08:41:28 +08:00
{
2021-01-11 08:54:28 +08:00
public override string ClassName { get { return "Vessel"; } }
2020-07-06 08:41:28 +08:00
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
2021-01-11 08:54:28 +08:00
base.OnGUI(pos, prop, label);
if (MakeFoldout(prop, "m_Show"))
2020-07-06 08:41:28 +08:00
{
2021-01-11 08:54:28 +08:00
++EditorGUI.indentLevel;
PropertyField(prop, "m_Shape");
PropertyField(prop, "m_ShapeWidth");
PropertyField(prop, "m_Gap");
PropertyTwoFiled(prop, "m_Center");
PropertyField(prop, "m_Radius");
PropertyField(prop, "m_BackgroundColor");
PropertyField(prop, "m_Color");
PropertyField(prop, "m_AutoColor");
PropertyField(prop, "m_Smoothness");
--EditorGUI.indentLevel;
2020-07-06 08:41:28 +08:00
}
}
}
}