1
0
mirror of https://github.com/Siccity/xNode.git synced 2026-03-26 22:49:02 +08:00
xNode/Scripts/Editor/Drawers/Odin/SimpleNodePortDrawer.cs
2019-09-25 21:10:57 -04:00

26 lines
507 B
C#

#if UNITY_EDITOR && ODIN_INSPECTOR
using Sirenix.OdinInspector.Editor;
using UnityEditor;
using UnityEngine;
using XNode;
namespace XNodeEditor.Odin
{
public class SimpleNodePortDrawer<T> : OdinValueDrawer<T>
where T : NodePort
{
protected override void Initialize()
{
base.Initialize();
this.SkipWhenDrawing = !NodeEditor.isNodeEditor;
}
protected override void DrawPropertyLayout( GUIContent label )
{
if ( label != null )
EditorGUILayout.LabelField( label );
}
}
}
#endif