using System; using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; using XNode; namespace XNodeEditor { public interface INodeEditor { Editor editor { get; } void OnBodyGUI(); void OnHeaderGUI(); /// Add items for the context menu when right-clicking this node. Override to add custom menu items. void AddContextMenuItems(GenericMenu menu); } [AttributeUsage(AttributeTargets.Class)] public class CustomNodeEditorAttribute : Attribute, XNodeEditor.Internal.INodeEditorAttrib { private Type inspectedType; /// Tells a NodeEditor which Node type it is an editor for /// Type that this editor can edit public CustomNodeEditorAttribute(Type inspectedType) { this.inspectedType = inspectedType; } public Type GetInspectedType() { return inspectedType; } } }