#if UNITY_EDITOR && ODIN_INSPECTOR using Sirenix.OdinInspector; using Sirenix.OdinInspector.Editor; using System; using System.Collections.Generic; using System.Reflection; using UnityEditor; using UnityEngine; using XNode; namespace XNodeEditor.Odin { [DrawerPriority( 0.3, 0, 0 )] public class SimpleNodePortDrawer : OdinValueDrawer 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 ); } } public class NodePortAttributeProcessor : OdinAttributeProcessor { public override bool CanProcessSelfAttributes( InspectorProperty property ) { return true; } public override bool CanProcessChildMemberAttributes( InspectorProperty parentProperty, MemberInfo member ) { return false; } public override void ProcessSelfAttributes( InspectorProperty property, List attributes ) { attributes.Add( new HideReferenceObjectPickerAttribute() ); } } } #endif