CreateVisualizationContext(Hash128)
Creates and registers a new visualization context.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor.GraphVisualization
- Assembly: UnityEditor
public static Context CreateVisualizationContext(Hash128 graphID)
Parameters
Returns
Type | Description |
|---|---|
| Context | The newly created Context, registered with the Registry and associated with the provided |
Remarks
The authoring graph's ID is used to associate the visualization context with a specific graph. For subgraphs, using the root graph ID associates the context with the entire graph hierarchy. A unique identifier for the context is accessible through Context.VisualizationContextID. Dispose of the returned Context when it is no longer needed. Throws an ArgumentException when the provided graph ID is not valid.
Examples
using Context context = Registry.CreateVisualizationContext(graphGuid);NodeReference nodeRef = context.GetNodeReference(nodeID);nodeRef.FillAmount = 50f;