Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CreateVisualizationContext(Hash128)

Creates and registers a new visualization context.
Read time 1 minuteLast updated 7 days ago

Definition

public static Context CreateVisualizationContext(Hash128 graphID)

Parameters

graphID

The authoring graph's ID, accessible through Graph.ID. For subgraphs, use the root graph ID.

Returns

Type

Description

ContextThe newly created Context, registered with the Registry and associated with the provided
graphID
. Use it to apply visualization data to nodes in that graph.

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;