Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

Registry.CreateVisualizationContext

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static Context CreateVisualizationContext(Hash128 graphID);

Parameters

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

Returns

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

Description

Creates and registers a new visualization context.

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.

 using Context context = Registry.CreateVisualizationContext(graphGuid);
 NodeReference nodeRef = context.GetNodeReference(nodeID);
 nodeRef.FillAmount = 50f;