mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-25 18:30:14 +00:00
增加桑基图相关支持
This commit is contained in:
24
Editor/Series/SerieDataLinkDrawer.cs
Normal file
24
Editor/Series/SerieDataLinkDrawer.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using XCharts.Runtime;
|
||||
|
||||
namespace XCharts.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(SerieDataLink), true)]
|
||||
public class SerieDataLinkDrawer : BasePropertyDrawer
|
||||
{
|
||||
public override string ClassName { get { return "Link"; } }
|
||||
public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label)
|
||||
{
|
||||
base.OnGUI(pos, prop, label);
|
||||
if (MakeComponentFoldout(prop, "", true))
|
||||
{
|
||||
++EditorGUI.indentLevel;
|
||||
PropertyField(prop, "m_Source");
|
||||
PropertyField(prop, "m_Target");
|
||||
PropertyField(prop, "m_Value");
|
||||
--EditorGUI.indentLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user