docs.unity.cn
    Show / Hide Table of Contents

    Class INodeEditor

    Describes how to draw a node, paired with GenericNodeview

    Inheritance
    Object
    INodeEditor
    NodeEditor
    Namespace: Mechatronics.SystemGraph
    Syntax
    [Serializable]
    public abstract class INodeEditor

    Fields

    _nodeGuid

    The node unique identifier

    Declaration
    [SerializeField]
    protected string _nodeGuid
    Field Value
    Type Description
    String

    _portDescriptions

    The port descriptions

    Declaration
    [NonSerialized]
    protected List<IPortEditor> _portDescriptions
    Field Value
    Type Description
    List<IPortEditor>

    Properties

    BoundObject

    Gets or sets the bound object.

    Declaration
    public string BoundObject { get; set; }
    Property Value
    Type Description
    String

    The bound object.

    BoundParameterGuid

    Gets or sets the bound parameter unique identifier.

    Declaration
    public string BoundParameterGuid { get; set; }
    Property Value
    Type Description
    String

    The bound parameter unique identifier.

    BoundParameterType

    Gets or sets the type of the bound parameter.

    Declaration
    public string BoundParameterType { get; set; }
    Property Value
    Type Description
    String

    The type of the bound parameter.

    Descriptor

    Gets the node descriptor.

    Declaration
    public NodeDescriptor Descriptor { get; }
    Property Value
    Type Description
    NodeDescriptor

    The node descriptor.

    ExpandableType

    Gets or sets the type of the expandable.

    Declaration
    public Type ExpandableType { get; set; }
    Property Value
    Type Description
    Type

    The type of the expandable.

    IsExpandable

    Gets or sets a value indicating whether this instance is expandable.

    Declaration
    public bool IsExpandable { get; set; }
    Property Value
    Type Description
    Boolean

    true if this instance is expandable; otherwise, false.

    NodeGuid

    Gets or sets the node unique identifier.

    Declaration
    public string NodeGuid { get; set; }
    Property Value
    Type Description
    String

    The node unique identifier.

    NodeView

    Gets or sets the node view.

    Declaration
    public LogicNodeView NodeView { get; set; }
    Property Value
    Type Description
    LogicNodeView

    The node view.

    Owner

    Gets or sets the owner.

    Declaration
    public INodeEditor.OwnerDescriptor Owner { get; set; }
    Property Value
    Type Description
    INodeEditor.OwnerDescriptor

    The owner.

    Ports

    Gets the port editor list.

    Declaration
    public List<IPortEditor> Ports { get; }
    Property Value
    Type Description
    List<IPortEditor>

    The ports.

    PortVisual

    Gets the port visual descriptors.

    Declaration
    public List<INodeEditor.PortVisualDescriptor> PortVisual { get; }
    Property Value
    Type Description
    List<INodeEditor.PortVisualDescriptor>

    The port visual descriptors.

    SerializedNode

    Gets or sets the serialized node.

    Declaration
    public SerializedNode SerializedNode { get; set; }
    Property Value
    Type Description
    SerializedNode

    The serialized node.

    SerializedParameter

    Gets or sets the serialized parameter.

    Declaration
    public SerializedParameter SerializedParameter { get; set; }
    Property Value
    Type Description
    SerializedParameter

    The serialized parameter.

    Methods

    AddChildSlot(IPortEditor, IPortEditor)

    Adds the child slot.

    Declaration
    public void AddChildSlot(IPortEditor portDescription, IPortEditor parent)
    Parameters
    Type Name Description
    IPortEditor portDescription

    The port description.

    IPortEditor parent

    The parent.

    Exceptions
    Type Condition
    ArgumentException

    AddChildVarSlot<T>(String, IPortEditor, T)

    Adds the child variable slot.

    Declaration
    public IPortEditor AddChildVarSlot<T>(string name, IPortEditor parent, T refData)
    Parameters
    Type Name Description
    String name

    The name of the slot.

    IPortEditor parent

    The parent port editor.

    T refData

    The reference data and type for this slot.

    Returns
    Type Description
    IPortEditor

    IPortEditor added.

    Type Parameters
    Name Description
    T

    AddSlot(IPortEditor)

    Adds the slot from a port description.

    Declaration
    public void AddSlot(IPortEditor portDescription)
    Parameters
    Type Name Description
    IPortEditor portDescription

    The port description.

    Exceptions
    Type Condition
    ArgumentException

    AddVarSlot<T>(String, String, PortDirection, FieldExtra, T)

    Adds the attached variable to a node slot.

    Declaration
    public void AddVarSlot<T>(string name, string tooltip, PortDirection portDirection, FieldExtra fieldRW, T refData)
    Parameters
    Type Name Description
    String name

    The name of the slot.

    String tooltip

    The tooltip.

    PortDirection portDirection

    The port direction.

    FieldExtra fieldRW

    The field extra settings.

    T refData

    The reference data.

    Type Parameters
    Name Description
    T

    AddVarSlotForBoundParameter<T>(String, String, PortDirection, FieldExtra, T)

    Adds the variable slot for bound parameter.

    Declaration
    public void AddVarSlotForBoundParameter<T>(string name, string tooltip, PortDirection portDirection, FieldExtra fieldRW, T refData)
    Parameters
    Type Name Description
    String name

    The name of the slot.

    String tooltip

    The tooltip.

    PortDirection portDirection

    The port direction.

    FieldExtra fieldRW

    The field extra settings.

    T refData

    The referenced data.

    Type Parameters
    Name Description
    T

    ClearSlots(Boolean)

    Clears the slots.

    Declaration
    public void ClearSlots(bool removeSerializedEdges)
    Parameters
    Type Name Description
    Boolean removeSerializedEdges

    Remove the serialization of edges when clearing slots

    ConstructNode(Boolean)

    Constructs the node.

    Declaration
    public abstract void ConstructNode(bool removeEdgeSerialization = false)
    Parameters
    Type Name Description
    Boolean removeEdgeSerialization

    if set to true [remove edge serialization].

    FindInputSlot<T>(String)

    Finds the input slot by name.

    Declaration
    public T FindInputSlot<T>(string memberName)
        where T : IPortEditor
    Parameters
    Type Name Description
    String memberName

    Name of the member.

    Returns
    Type Description
    T

    Slot of type T.

    Type Parameters
    Name Description
    T

    FindOutputSlot<T>(String)

    Finds the output slot by name.

    Declaration
    public T FindOutputSlot<T>(string memberName)
        where T : IPortEditor
    Parameters
    Type Name Description
    String memberName

    Name of the member.

    Returns
    Type Description
    T

    Slot of type T.

    Type Parameters
    Name Description
    T

    FindSlot<T>(String)

    Finds the slot by name.

    Declaration
    public T FindSlot<T>(string memberName)
        where T : IPortEditor
    Parameters
    Type Name Description
    String memberName

    Name of the member.

    Returns
    Type Description
    T

    Slot of type T.

    Type Parameters
    Name Description
    T

    GetInputSlots<T>(List<T>)

    Gets the input slots.

    Declaration
    public void GetInputSlots<T>(List<T> foundSlots)
        where T : IPortEditor
    Parameters
    Type Name Description
    List<T> foundSlots

    The found slots for this node.

    Type Parameters
    Name Description
    T

    GetOutputSlots<T>(List<T>)

    Gets the output slots.

    Declaration
    public void GetOutputSlots<T>(List<T> foundSlots)
        where T : IPortEditor
    Parameters
    Type Name Description
    List<T> foundSlots

    The found slots of this node.

    Type Parameters
    Name Description
    T

    GetSlots<T>(List<T>)

    Gets the slots.

    Declaration
    public void GetSlots<T>(List<T> foundSlots)
        where T : IPortEditor
    Parameters
    Type Name Description
    List<T> foundSlots

    The found slots of this node.

    Type Parameters
    Name Description
    T

    RefreshBoundParameter()

    Refreshes the bound parameter.

    Declaration
    public abstract void RefreshBoundParameter()

    RemoveChildSlot(IPortEditor, IPortEditor)

    Removes a specified child slot.

    Declaration
    public void RemoveChildSlot(IPortEditor parent, IPortEditor description)
    Parameters
    Type Name Description
    IPortEditor parent

    The parent port editor.

    IPortEditor description

    The port editor description to remove.

    RemoveSlot(IPortEditor)

    Removes the slot associated with the PortEditor

    Declaration
    protected void RemoveSlot(IPortEditor portEditor)
    Parameters
    Type Name Description
    IPortEditor portEditor

    The port editor to remove.

    RemoveSlot(String)

    Removes the slot by guid.

    Declaration
    protected void RemoveSlot(string slotGuid)
    Parameters
    Type Name Description
    String slotGuid

    The slot unique identifier.

    SetDirty()

    Sets the dirty state.

    Declaration
    public virtual void SetDirty()
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, October 18, 2022
    Terms of use