CreateVisualizationContext(Hash128)
Creates and registers a new visualization context.
読み終わるまでの所要時間 1 分最終更新 6日前
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor.GraphVisualization
- Assembly: UnityEditor
public static Context CreateVisualizationContext(Hash128 graphID)
Parameters
The authoring graph's ID, accessible through Graph.ID. For subgraphs, use the root graph ID.
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. The returned Context doesn't survive a domain reload. Call this method again after a domain reload to restore the visualization. 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;