Class ScriptGraphGraph
This class contains all the data of a script graph. The nodes, connections, parameters, etc.
Inheritance
Object
ScriptableObject
ScriptGraphGraph
Implements
ISerializationCallbackReceiver
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetInstanceID()
Object.GetHashCode()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.ToString()
Object.name
Object.hideFlags
Syntax
public class ScriptGraphGraph : VersionedScriptableObject, IVersioned, ISerializationCallbackReceiver
Properties
CanBeAddedAsNode
Declaration
public bool CanBeAddedAsNode { get; set; }
Property Value
ConsumerNodes
Gets all the graph's consumer nodes.
Declaration
public ReadOnlyCollection<IConsumerNode> ConsumerNodes { get; }
Property Value
CustomPreviewBehaviour
Declaration
public IPreviewBehaviour CustomPreviewBehaviour { get; set; }
Property Value
DependencyContainer
Declaration
public DependencyContainer DependencyContainer { get; }
Property Value
GroupNodes
Declaration
public ReadOnlyCollection<GroupNode> GroupNodes { get; }
Property Value
Id
Declaration
public string Id { get; set; }
Property Value
Gets all the graph's input nodes.
Declaration
public ReadOnlyCollection<InputNode> InputNodes { get; }
Property Value
Declaration
public ScriptGraphParameters InputParameters { get; }
Property Value
NodePath
Declaration
public string NodePath { get; set; }
Property Value
Nodes
Gets all the graph's nodes.
Declaration
public ReadOnlyCollection<IScriptNode> Nodes { get; }
Property Value
OutputNodes
Gets all the graph's output nodes.
Declaration
public ReadOnlyCollection<OutputNode> OutputNodes { get; }
Property Value
OutputParameters
Declaration
public ScriptGraphParameters OutputParameters { get; }
Property Value
Processor
Gets/sets the processor currently processing this graph.
Declaration
[Obsolete("The graph should no longer be dependent on the processor. Will be removed in version 2.0.")]
public ScriptGraphProcessor Processor { get; set; }
Property Value
ProcessorNodes
Gets all the graph's processor nodes.
Declaration
public ReadOnlyCollection<IProcessorNode> ProcessorNodes { get; }
Property Value
ReferenceNodes
Declaration
public IList<ReferenceNode> ReferenceNodes { get; }
Property Value
SortedProcessorNodes
Gets all the graph's processor nodes in the order they should be processed in.
Declaration
[Obsolete("Determining the order of execution should now be done using an execution graph. This property will be removed in version 2.0.")]
public ReadOnlyCollection<IProcessorNode> SortedProcessorNodes { get; }
Property Value
Methods
Add(IScriptNode)
Add the given node to the graph.
Declaration
public void Add(IScriptNode node)
Parameters
Type |
Name |
Description |
IScriptNode |
node |
The node to add.
|
AddGroup(GroupNode)
Declaration
public void AddGroup(GroupNode groupNode)
Parameters
AddReferenceNode(ReferenceNode)
Adds a reference node to the graph.
Declaration
public void AddReferenceNode(ReferenceNode referenceNode)
Parameters
Type |
Name |
Description |
ReferenceNode |
referenceNode |
The reference node to add.
|
Clean()
Declaration
ConnectReferenceNode(ReferenceNode, InPort, OutPort)
Connect a reference node. Only available in the editor.
Declaration
public void ConnectReferenceNode(ReferenceNode referenceNode, InPort inPort, OutPort outPort)
Parameters
DisconnectReferenceNode(ReferenceNode, InPort)
Disconnect a reference node from the given in port. Only available in the editor.
Declaration
public void DisconnectReferenceNode(ReferenceNode referenceNode, InPort inPort)
Parameters
Type |
Name |
Description |
ReferenceNode |
referenceNode |
The reference node.
|
InPort |
inPort |
The in port to disconnect from.
|
GetReferenceNodeConnection(InPort, OutPort)
Finds the reference node connection between an in and out port and returns it. Only available in the editor.
Declaration
public ReferenceNodeConnection GetReferenceNodeConnection(InPort inPort, OutPort outPort)
Parameters
Type |
Name |
Description |
InPort |
inPort |
The in port.
|
OutPort |
outPort |
The out port.
|
Returns
Get<T>()
Declaration
public T Get<T>() where T : ScriptableObject
Returns
Type Parameters
OnAfterDeserialize()
Implement this method to receive a callback after Unity deserializes your object.
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Implement this method to receive a callback before Unity serializes your object.
Declaration
public void OnBeforeSerialize()
RegisterDependencies(DependencyContainer)
Declaration
public virtual void RegisterDependencies(DependencyContainer container)
Parameters
Remove(IScriptNode)
Remove the given node from the graph.
Declaration
public void Remove(IScriptNode node)
Parameters
RemoveGroup(GroupNode)
Declaration
public void RemoveGroup(GroupNode groupNode)
Parameters
Remove the input parameter with given name from the graph.
Declaration
public void RemoveInputParameterNodes(string parameterId)
Parameters
Type |
Name |
Description |
string |
parameterId |
The input parameters name.
|
RemoveOutputParameterNodes(string)
Remove the output parameter with given name from the graph.
Declaration
public void RemoveOutputParameterNodes(string parameterId)
Parameters
Type |
Name |
Description |
string |
parameterId |
The output parameters name.
|
RemoveReferenceNode(ReferenceNode)
Remove the reference node from the graph. Only available in the editor.
Declaration
public void RemoveReferenceNode(ReferenceNode referenceNode)
Parameters
Type |
Name |
Description |
ReferenceNode |
referenceNode |
The reference node.
|
Sort()
Sorts the graph so that processor nodes are processed in the right order, i.e. a node will never be processed
before the processor nodes it's receiving input from.
Declaration
[Obsolete("Determining the order of execution should now be done using an execution graph. This method will be removed in version 2.0.")]
public void Sort()
UpdateDataDependencies()
Declaration
public void UpdateDataDependencies()
Events
OnEnabled
Global event that's called every time a script graph has been enabled.
Declaration
public static event Action<ScriptGraphGraph> OnEnabled
Event Type
OnGroupNodeAdded
Declaration
public event Action<GroupNode> OnGroupNodeAdded
Event Type
OnGroupNodeRemoved
Declaration
public event Action<GroupNode> OnGroupNodeRemoved
Event Type
OnScriptNodeAdded
Declaration
public event Action<IScriptNode> OnScriptNodeAdded
Event Type
OnScriptNodeRemoved
Declaration
public event Action<IScriptNode> OnScriptNodeRemoved
Event Type
Implements
UnityEngine.ISerializationCallbackReceiver