Class ScriptGraphPort
Base class for the in and out ports that can be added to each script graph node.
Implements
UnityEngine.ISerializationCallbackReceiver
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
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 |
---|---|
System.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 |
---|---|---|
string | name | |
System.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 |
---|---|---|
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()
Implements
UnityEngine.ISerializationCallbackReceiver