IO Node<T>
The IO Node is a simpler version of the Branch Node. It takes a single input of any type, and outputs to a single output of any type.
Creating Nodes
Here's a video tutorial on creating all node variants in Jungle.
Overview
All IO Nodes are required to have an IONode
class attribute defined. This attribute defines the input port and
output port on the node.
Here's a list of all the properties you can define in the IONode
attribute:
Property | Type | Description |
---|---|---|
InputPortName | string | Defines the name of the input port. |
OutputPortName | string | Defines the name of the output port. |
OutputPortType | Type | Defines the ports outputted type. |
[IONode(
InputPortName = "My Input",
OutputPortName = "My Output",
OutputPortType = typeof(Port.None)
)]
public class MyIONode : IONode<Port.None>
...
Result in the Jungle Editor
The IO Node is a generic class, so you define the input port type when you inherit from the class.
For example, if you want the input port to accept a float
value, you would set your script up like so:
public class MyIONode : IONode<float>
...
The IONode<T>
class inherits from the JungleNode
class.
This means all public and protected members of JungleNode
are accessible within IONode<T>
.
Read about the base JungleNode
class here.
Properties
Uid
public string Uid { get; }
Gets the unique identifier for this node.
JungleTree
public JungleTree JungleTree { get; }
Gets a reference to the original tree this node is part of.
OutputPorts
public Port[] OutputPorts { get; }
Gets the list of output ports for this node.
Nothing
public static readonly Port.None Nothing
Gets the shorthand equivalent of new Port.None()
.
IsPlayback
public bool IsPlayback { get; }
Indicates whether this node is an instance of a playback.
Playback
public JunglePlayback Playback
Gets the playback instance associated with this node.
Methods
GetInputPortInfo
public override Port.Info GetInputPortInfo()
Returns information about the node's input port.
GetOutputPortsInfo
public override Port.Info[] GetOutputPortsInfo()
Returns information about the node's output ports.