docs.unity.cn
    Show / Hide Table of Contents

    Class NodeEditor

    NodeEditor extension for SystemGraph node. It is a container for the information within a node: ports, position, state of ports. Describes how to draw a node. Implements the INodeEditor

    Inheritance
    Object
    INodeEditor
    NodeEditor
    Inherited Members
    INodeEditor._portDescriptions
    INodeEditor._nodeGuid
    INodeEditor.PortVisual
    INodeEditor.Ports
    INodeEditor.Owner
    INodeEditor.Descriptor
    INodeEditor.NodeView
    INodeEditor.IsExpandable
    INodeEditor.ExpandableType
    INodeEditor.BoundParameterType
    INodeEditor.BoundParameterGuid
    INodeEditor.BoundObject
    INodeEditor.NodeGuid
    INodeEditor.SerializedNode
    INodeEditor.SerializedParameter
    INodeEditor.ClearSlots(Boolean)
    INodeEditor.GetInputSlots<T>(List<T>)
    INodeEditor.GetOutputSlots<T>(List<T>)
    INodeEditor.GetSlots<T>(List<T>)
    INodeEditor.AddChildVarSlot<T>(String, IPortEditor, T)
    INodeEditor.AddChildSlot(IPortEditor, IPortEditor)
    INodeEditor.RemoveChildSlot(IPortEditor, IPortEditor)
    INodeEditor.AddVarSlotForBoundParameter<T>(String, String, PortDirection, FieldExtra, T)
    INodeEditor.AddVarSlot<T>(String, String, PortDirection, FieldExtra, T)
    INodeEditor.AddSlot(IPortEditor)
    INodeEditor.FindSlot<T>(String)
    INodeEditor.FindInputSlot<T>(String)
    INodeEditor.FindOutputSlot<T>(String)
    INodeEditor.RemoveSlot(IPortEditor)
    INodeEditor.RemoveSlot(String)
    Namespace: Mechatronics.SystemGraph
    Syntax
    [Serializable]
    public class NodeEditor : INodeEditor

    Constructors

    NodeEditor(NodeRuntime)

    Initializes a new instance of the NodeEditor class.

    Declaration
    public NodeEditor(NodeRuntime nodeRT)
    Parameters
    Type Name Description
    NodeRuntime nodeRT

    The node runtime to associate.

    Fields

    AttachedProperty

    The attached property

    Declaration
    [NonSerialized]
    public IProperty AttachedProperty
    Field Value
    Type Description
    IProperty

    targetGroup

    The target group

    Declaration
    public SystemGroupView targetGroup
    Field Value
    Type Description
    SystemGroupView

    Properties

    DisplayName

    Gets or sets the display name.

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

    The display name.

    Expanded

    Gets or sets a value indicating whether this NodeEditor is expanded.

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

    true if expanded; otherwise, false.

    MirrorPorts

    Gets or sets a value indicating whether ports are mirrored.

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

    true if [mirrored ports]; otherwise, false.

    NodeRT

    Gets or sets the node runtime.

    Declaration
    public NodeRuntime NodeRT { get; set; }
    Property Value
    Type Description
    NodeRuntime

    The node runtime.

    Position

    Gets or sets the position of the node editor.

    Declaration
    public Vector3 Position { get; set; }
    Property Value
    Type Description
    Vector3

    The position.

    Methods

    AddDynamicPort(String, Type, PortDirection, FieldExtra)

    Adds a dynamic port to the node.

    Declaration
    public bool AddDynamicPort(string name, Type portType, PortDirection direction, FieldExtra rw)
    Parameters
    Type Name Description
    String name

    The name.

    Type portType

    Type of the port.

    PortDirection direction

    The direction.

    FieldExtra rw

    The field extra settings.

    Returns
    Type Description
    Boolean

    true if succeeded, false otherwise.

    AddListPort<T>(IPortEditor, String, T)

    Adds a list port.

    Declaration
    public bool AddListPort<T>(IPortEditor parentPort, string childName, T portRef)
    Parameters
    Type Name Description
    IPortEditor parentPort

    The parent port.

    String childName

    Name of the child.

    T portRef

    The port reference.

    Returns
    Type Description
    Boolean

    true if succeeded, false otherwise.

    Type Parameters
    Name Description
    T

    AddListPort<T>(String)

    Adds a list port.

    Declaration
    public IPortEditor AddListPort<T>(string parentPort)
    Parameters
    Type Name Description
    String parentPort

    The parent port.

    Returns
    Type Description
    IPortEditor

    Added PortEditor.

    Type Parameters
    Name Description
    T

    AddListPort<T>(String, T)

    Adds a list port.

    Declaration
    public IPortEditor AddListPort<T>(string parentPort, T portRef)
    Parameters
    Type Name Description
    String parentPort

    The parent port.

    T portRef

    The port reference.

    Returns
    Type Description
    IPortEditor

    Added PortEditor.

    Type Parameters
    Name Description
    T

    AddPorts()

    Adds the ports of that node editor.

    Declaration
    public void AddPorts()

    ConstructNode(Boolean)

    Constructs the node from this node editor.

    Declaration
    public override void ConstructNode(bool removeSerializedEdges = false)
    Parameters
    Type Name Description
    Boolean removeSerializedEdges

    if set to true [remove edge serialization].

    Overrides
    INodeEditor.ConstructNode(Boolean)

    GetPortIndex(PortView)

    Gets the index of the port.

    Declaration
    public int GetPortIndex(PortView port)
    Parameters
    Type Name Description
    PortView port

    The port view.

    Returns
    Type Description
    Int32

    PortView index in the node.

    IsDebugMode()

    Determines whether we are in debug mode.

    Declaration
    public bool IsDebugMode()
    Returns
    Type Description
    Boolean

    true if debug mode state; otherwise, false.

    NodeType()

    Retrieve the node type name.

    Declaration
    public string NodeType()
    Returns
    Type Description
    String

    Node type name.

    RefreshBoundParameter()

    Refreshes the bound parameter information.

    Declaration
    public override void RefreshBoundParameter()
    Overrides
    INodeEditor.RefreshBoundParameter()

    RemoveDynamicPort(String)

    Removes a dynamic port.

    Declaration
    public bool RemoveDynamicPort(string name)
    Parameters
    Type Name Description
    String name

    The name to remove.

    Returns
    Type Description
    Boolean

    true if succeeded, false otherwise.

    RemoveListPort(IPortEditor)

    Removes a list port.

    Declaration
    public IPortEditor RemoveListPort(IPortEditor parent)
    Parameters
    Type Name Description
    IPortEditor parent

    The parent port editor.

    Returns
    Type Description
    IPortEditor

    IPortEditor that was removed.

    RenameDynamicPort(Int32, String)

    Renames a dynamic port.

    Declaration
    public bool RenameDynamicPort(int idx, string toName)
    Parameters
    Type Name Description
    Int32 idx

    The index.

    String toName

    To name.

    Returns
    Type Description
    Boolean

    true if succeeded, false otherwise.

    RenameDynamicPort(String, String)

    Renames a dynamic port.

    Declaration
    public bool RenameDynamicPort(string fromName, string toName)
    Parameters
    Type Name Description
    String fromName

    From name.

    String toName

    To name.

    Returns
    Type Description
    Boolean

    true if succeeded, false otherwise.

    SetDirty()

    Sets the dirty state. Setting dirty to true will generate the serialized data for this node editor.

    Declaration
    public override void SetDirty()
    Overrides
    INodeEditor.SetDirty()

    SortSlots()

    Sorts the slots so they show up in the customized order.

    Declaration
    public void SortSlots()

    See Also

    INodeEditor
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, October 18, 2022
    Terms of use