增加AnimationExchange排序交换动画

This commit is contained in:
monitor1394
2025-03-26 08:28:27 +08:00
parent 9e07617cc4
commit 0b218f6dfe
11 changed files with 365 additions and 28 deletions

View File

@@ -71,6 +71,21 @@ namespace XCharts.Editor
}
}
[CustomPropertyDrawer(typeof(XCharts.Runtime.AnimationExchange), true)]
public class AnimationExchangeDrawer : BasePropertyDrawer
{
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
{
base.OnGUI(pos, prop, label);
if (MakeComponentFoldout(prop, "m_Enable", true))
{
++EditorGUI.indentLevel;
PropertyField(prop, "m_Duration");
--EditorGUI.indentLevel;
}
}
}
[CustomPropertyDrawer(typeof(AnimationStyle), true)]
public class AnimationDrawer : BasePropertyDrawer
{
@@ -88,6 +103,7 @@ namespace XCharts.Editor
PropertyField(prop, "m_Change");
PropertyField(prop, "m_Addition");
PropertyField(prop, "m_Interaction");
PropertyField(prop, "m_Exchange");
--EditorGUI.indentLevel;
}
}