Skip to content

Node.AddInstanceInput

Thor Brigsted edited this page Mar 5, 2019 · 6 revisions

Add a dynamic, serialized port to this node

public NodePort AddInstanceInput(Type type, string fieldName = null);
Parameters Summary
type NodePort value type.
fieldName Unique identifier used to find this NodePort. Automatically assigns a unique name if null.
using UnityEngine;
using XNode;

public class ExampleNode : Node{

    [ContextMenu("Add instance input")]
    void AddPort() {
        NodePort port = AddInstanceInput(typeof(float));
        Debug.Log("Added new input port with name " + port.fieldName);
    }
}

See also: AddInstanceOutput, AddInstancePort, RemoveInstancePort

Clone this wiki locally