Class GraphAsset
Adds helper value types used by graph-asset mutation APIs.
public abstract class GraphAsset : ScriptableObject, ISerializationCallbackReceiver
- Inheritance
-
ObjectScriptableObjectGraphAsset
- Implements
-
ISerializationCallbackReceiver
- Derived
- 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.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
- Extension Methods
Remarks
GraphAsset is the core persistence layer of the graph system. It owns the serialized node, edge, grouping, sticky-note, sticky-image, object-reference, and exposed-property state for a graph, and rebuilds the runtime object model from that serialized data after deserialization. Concrete graph types such as TerrainGraph build execution behavior on top of this backbone.
Properties
- HasExposedProperties
Gets whether this graph currently contains any exposed properties.
Methods
- AcceptNodeType(Type)
Returns whether this graph type accepts a node type for insertion.
- AddEdge(IEdge)
Adds an edge to the graph.
- AddGroup(IGroup)
Adds a group to the graph.
- AddNode(INode)
Adds a node to the graph.
- AddStickyImage(IStickyImage)
Adds a sticky image to the graph canvas state.
- AddStickyNote(IStickyNote)
Adds a sticky note to the graph canvas state.
- GetDependencySubGraphs()
Gets subgraphs that should be treated as execution dependencies of this graph.
- GetEdge(string)
Gets an edge by ID.
- GetEdges()
Gets a copy of the edge list.
- GetGroup(string)
Gets a group by ID.
- GetGroups()
Gets a copy of the group list.
- GetNode(string)
Gets a node by ID.
- GetNode(Type)
Gets the first node assignable to a specific CLR type.
- GetNode<T>()
Gets the first node assignable to a specific CLR type.
- GetNodes()
Gets a copy of the node list.
- GetNodes(Type)
Gets nodes assignable to a specific CLR type.
- GetNodesOfType<T>()
Gets nodes assignable to a specific CLR type and casts them to that type.
- GetNodes<T>()
Gets nodes assignable to a specific CLR type.
- GetSerializedAssetFields(Type)
Gets the fields on a node type that should be stored through the graph asset-reference bridge.
- GetStickyImage(string)
Gets a sticky image by ID.
- GetStickyImages()
Gets a copy of the sticky-image list.
- GetStickyNote(string)
Gets a sticky note by ID.
- GetStickyNotes()
Gets a copy of the sticky-note list.
- HasID(string)
Returns whether an ID is already used by any graph element stored in this asset.
- HasNode(string)
Returns whether the graph contains a node with the specified ID.
- InvokeChangeEvent()
Raises the shared graph-changed event for this graph asset.
- OnAfterDeserialize()
Rebuilds the runtime graph model from the serialized backing data.
- OnBeforeSerialize()
Serializes the runtime graph model into Unity-serializable backing data.
- RemoveEdge(string)
Removes one edge by ID.
- RemoveGroup(string)
Removes a group by ID.
- RemoveNode(string)
Removes a node and every edge connected to its input or output slots.
- RemoveStickyImage(string)
Removes a sticky image by ID.
- RemoveStickyNote(string)
Removes a sticky note by ID.
- Reset()
Reinitializes all graph collections to an empty graph state.
- Validate()
Removes invalid graph state and reports whether anything was changed during cleanup.
- WillCreateRecursive(IEdge)
Returns whether adding an edge would create a recursive dependency path.
Events
- graphChanged
Occurs when a graph explicitly broadcasts that it has changed.