Class ScriptGraphPort
Base class for the in and out ports that can be added to each script graph node.
Implements
ISerializationCallbackReceiver
Inherited Members
Namespace: InsaneScatterbrain.ScriptGraph
Syntax
[Serializable]
public abstract class ScriptGraphPort : ISerializationCallbackReceiver
Properties
Name
Gets the node's name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
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)
Factory method to create a new port of type.
Declaration
protected static TPort Create<TPort>(string name, Type type, IScriptNode owner) where TPort : ScriptGraphPort, new()
Parameters
Type | Name | Description |
---|---|---|
string | name | The port's name. |
Type | type | |
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. |
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 |
---|---|---|
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()
Implement this method to receive a callback after Unity deserializes your object.
Declaration
public virtual void OnAfterDeserialize()
OnBeforeSerialize()
Implement this method to receive a callback before Unity serializes your object.
Declaration
public virtual void OnBeforeSerialize()
Implements
UnityEngine.ISerializationCallbackReceiver