Class ScriptGraphGraph
This class contains all the data of a script graph. The nodes, connections, parameters, etc.
Inheritance
object
UnityEngine.Object
UnityEngine.ScriptableObject
ScriptGraphGraph
Inherited Members
UnityEngine.ScriptableObject.SetDirty()
UnityEngine.ScriptableObject.CreateInstance(string)
UnityEngine.ScriptableObject.CreateInstance(System.Type)
UnityEngine.ScriptableObject.CreateInstance<T>()
UnityEngine.Object.GetInstanceID()
UnityEngine.Object.GetHashCode()
UnityEngine.Object.Equals(object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform)
UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Transform, bool)
UnityEngine.Object.Instantiate<T>(T)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Vector3, UnityEngine.Quaternion, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform)
UnityEngine.Object.Instantiate<T>(T, UnityEngine.Transform, bool)
UnityEngine.Object.Destroy(UnityEngine.Object, float)
UnityEngine.Object.Destroy(UnityEngine.Object)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object, bool)
UnityEngine.Object.DestroyImmediate(UnityEngine.Object)
UnityEngine.Object.FindObjectsOfType(System.Type)
UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object)
UnityEngine.Object.DestroyObject(UnityEngine.Object, float)
UnityEngine.Object.DestroyObject(UnityEngine.Object)
UnityEngine.Object.FindSceneObjectsOfType(System.Type)
UnityEngine.Object.FindObjectsOfTypeIncludingAssets(System.Type)
UnityEngine.Object.FindObjectsOfType<T>()
UnityEngine.Object.FindObjectOfType<T>()
UnityEngine.Object.FindObjectsOfTypeAll(System.Type)
UnityEngine.Object.FindObjectOfType(System.Type)
UnityEngine.Object.ToString()
UnityEngine.Object.name
UnityEngine.Object.hideFlags
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Syntax
public class ScriptGraphGraph : VersionedScriptableObject, IVersioned
Properties
ConsumerNodes
Gets all the graph's consumer nodes.
Declaration
public ReadOnlyCollection<IConsumerNode> ConsumerNodes { get; }
Property Value
Type |
Description |
System.Collections.ObjectModel.ReadOnlyCollection<T><IConsumerNode> |
|
Id
Declaration
public string Id { get; set; }
Property Value
Gets all the graph's input nodes.
Declaration
public ReadOnlyCollection<InputNode> InputNodes { get; }
Property Value
Type |
Description |
System.Collections.ObjectModel.ReadOnlyCollection<T><InputNode> |
|
Declaration
public ScriptGraphParameters InputParameters { get; }
Property Value
Nodes
Gets all the graph's nodes.
Declaration
public ReadOnlyCollection<IScriptNode> Nodes { get; }
Property Value
Type |
Description |
System.Collections.ObjectModel.ReadOnlyCollection<T><IScriptNode> |
|
OutputNodes
Gets all the graph's output nodes.
Declaration
public ReadOnlyCollection<OutputNode> OutputNodes { get; }
Property Value
Type |
Description |
System.Collections.ObjectModel.ReadOnlyCollection<T><OutputNode> |
|
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
Type |
Description |
System.Collections.ObjectModel.ReadOnlyCollection<T><IProcessorNode> |
|
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
Type |
Description |
System.Collections.ObjectModel.ReadOnlyCollection<T><IProcessorNode> |
|
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.
|
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
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.
|
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 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()
Events
OnEnabled
Global event that's called every time a script graph has been enabled.
Declaration
public static event Action<ScriptGraphGraph> OnEnabled
Event Type
OnScriptNodeAdded
Declaration
public event Action<IScriptNode> OnScriptNodeAdded
Event Type
OnScriptNodeRemoved
Declaration
public event Action<IScriptNode> OnScriptNodeRemoved
Event Type
Implements