Class PortalOutputNode<TData, TInputNode>
Base class for all portal output nodes, taking care of common logic. Each portal type will need to sub-class a pair of this and PortalInputNode<TData>. Due to Unity not supporting file-local identifiers for .cs files, implementations have to live in separate source files, so they can be assigned distinct GUIDs for serialization.
Implements
Inherited Members
Namespace: Holoride.ElasticSDK.Graph.Portals
Assembly: Holoride.ElasticSDK.Runtime.dll
Syntax
[DefaultNodeName("Portal Output")]
[HelpURL("http://localhost:8080/articles/Procedural-Generation/Graph-Node-Overview.html#portal-output")]
public abstract class PortalOutputNode<TData, TInputNode> : Node, IPortalOutputNode where TData : Node where TInputNode : PortalInputNode<TData>
Type Parameters
Name | Description |
---|---|
TData | The type of the data passed through this portal. |
TInputNode | The type of the input node this output connects to. |
Fields
ElasticNodeGraph
The graph to gather for portals.
Declaration
[FormerlySerializedAs("SourceGraph")]
[SerializeField]
protected ElasticNodeGraph ElasticNodeGraph
Field Value
Type | Description |
---|---|
ElasticNodeGraph |
Methods
CallRecursive(Action<Node>, ISet<Node>)
Calls the given action on all inputs recursive.
Declaration
public override void CallRecursive(Action<Node> action, ISet<Node> visited)
Parameters
Type | Name | Description |
---|---|---|
Action<Node> | action | The action to call on all inputs recursive. |
ISet<Node> | visited | An set that keeps track of whether a node was already visited. |
Overrides
GetValue(NodePort)
Returns a value based on requested port output.
Declaration
public override object GetValue(NodePort port)
Parameters
Type | Name | Description |
---|---|---|
XNode.NodePort | port | The requested port. |
Returns
Type | Description |
---|---|
object |
Overrides
Explicit Interface Implementations
IPortalOutputNode.ElasticNodeGraph
Gets the ElasticNodeGraph the Input node lives in.
Declaration
ElasticNodeGraph IPortalOutputNode.ElasticNodeGraph { get; }
Returns
Type | Description |
---|---|
ElasticNodeGraph |
IPortalOutputNode.GetOutputSinkPorts()
Returns the resolved output sink ports connected to this portal, i.e. the input ports of nodes connected to this portal output.
Declaration
IEnumerable<NodePort> IPortalOutputNode.GetOutputSinkPorts()
Returns
Type | Description |
---|---|
IEnumerable<XNode.NodePort> | The ports connected to this portal output. |
IPortalOutputNode.Input
Gets the IPortalInputNode this output is connected to, if any.
Declaration
IPortalInputNode IPortalOutputNode.Input { get; }
Returns
Type | Description |
---|---|
IPortalInputNode |