Class PortalInputNode<TData>
Base class for all portal input nodes, taking care of common logic. Each portal type will need to sub-class a pair of this and PortalOutputNode<TData, TInputNode>. 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 Input")]
[DefaultPreviewVisibility(false)]
[HelpURL("http://localhost:8080/articles/Procedural-Generation/Graph-Node-Overview.html#portal-input")]
public abstract class PortalInputNode<TData> : Node, IPortalInputNode where TData : Node
Type Parameters
Name | Description |
---|---|
TData | The type of the data passed through this portal. |
Fields
Input
Defines the input port for this portal input.
Declaration
[SerializeField]
[Node.Input(Node.ShowBackingValue.Never, Node.ConnectionType.Override, Node.TypeConstraint.Strict, false, false, Optional = false)]
protected TData Input
Field Value
Type | Description |
---|---|
TData |
PortalName
Defines the name of this portal. Used in the list displayed in the editor of PortalOutputNode<TData, TInputNode> to allow users to connect portal nodes.
Declaration
[InspectorName("Name")]
[SerializeField]
protected string PortalName
Field Value
Type | Description |
---|---|
string |
Methods
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
IPortalInputNode.FindOutputNodes()
Returns all IPortalOutputNodes connected to this portal input.
Declaration
IEnumerable<IPortalOutputNode> IPortalInputNode.FindOutputNodes()
Returns
Type | Description |
---|---|
IEnumerable<IPortalOutputNode> | The outputs connected to this input. |
IPortalInputNode.GetInputSourcePorts()
Returns the resolved input source ports connected to this portal, i.e. the output ports of nodes connected to this portal input.
Declaration
IEnumerable<NodePort> IPortalInputNode.GetInputSourcePorts()
Returns
Type | Description |
---|---|
IEnumerable<XNode.NodePort> | The ports connected to this portal input. |
IPortalInputNode.PortalName
Gets the human readable name of the quantum link established by this portal.
Declaration
string IPortalInputNode.PortalName { get; }
Returns
Type | Description |
---|---|
string |