-
-
Notifications
You must be signed in to change notification settings - Fork 593
Node.AddInstanceOutput
Thor Brigsted edited this page Jan 23, 2018
·
4 revisions
Add a dynamic, serialized output port to this node
public NodePort AddInstanceOutput(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. |
Instance ports are not automatically displayed on default node inspectors. To visually modify instance ports, create a custom node inspector for your node.
using UnityEngine;
using XNode;
public class ExampleNode : Node{
[ContextMenu("Add instance output")]
void AddPort() {
NodePort port = AddInstanceOutput(typeof(float));
Debug.Log("Added new output port with name " + port.fieldName);
}
}
See also: AddInstanceInput, AddInstancePort, RemoveInstancePort