Class ScriptGraphPort
Base class for the in and out ports that can be added to each script graph node.
Namespace: InsaneScatterbrain.ScriptGraph
Syntax
public abstract class ScriptGraphPort : ISerializationCallbackReceiver
Properties
Name
Gets the node's name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Owner
Gets the node's owner, usually the node that it's been added to.
Declaration
public IScriptNode Owner { get; }
Property Value
Type | Description |
---|---|
IScriptNode |
Type
Gets the node's type.
Declaration
public Type Type { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
Create<TPort>(String, Type, IScriptNode)
Declaration
protected static TPort Create<TPort>(string name, Type type, IScriptNode owner)
where TPort : ScriptGraphPort, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
Type | type | |
IScriptNode | owner |
Returns
Type | Description |
---|---|
TPort |
Type Parameters
Name | Description |
---|---|
TPort |
Create<TPort, TValue>(String, IScriptNode)
Factory method to create a new port of type.
Declaration
public static TPort Create<TPort, TValue>(string name, IScriptNode owner)
where TPort : ScriptGraphPort, new()
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The port's name. |
IScriptNode | owner | The owning node. |
Returns
Type | Description |
---|---|
TPort | The new port. |
Type Parameters
Name | Description |
---|---|
TPort | The port's type. Probably want this to be either InPort or OutPort. |
TValue | The type of value the port either provides or consumes. |
OnAfterDeserialize()
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Declaration
public void OnBeforeSerialize()