mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
26 lines
507 B
C#
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 |