Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

ConditionReference

struct in Unity.GraphToolkit.Editor.GraphVisualization

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

Description

Identifies a condition inside a visualization ConditionReference.Context so visualization changes can be applied to it.

Obtain a ConditionReference from Context.GetConditionReference, providing the unique identifier of the condition. The reference is only meaningful for the ConditionReference.Context that produced it. Two ConditionReference values are equal when they share the same ConditionReference.ConditionID and refer to the same ConditionReference.Context instance.

Create a visualization context for a graph, retrieve a ConditionReference for a condition, apply a customization, then clear it.

Additional resources: ConditionReference.Context, Context.GetConditionReference

 using Context context = Registry.CreateVisualizationContext(graph.ID);
 ConditionReference condition = context.GetConditionReference(conditionID);
 condition.Icon = DebugStyles.PendingIcon;
 condition.ClearCustomization();

Properties

Property Description
ConditionID Unique identifier of the referenced condition.
Context Visualization context that produced the current condition reference.
Icon The icon override for the referenced condition, or null when no icon override is applied.

Public Methods

Method Description
ClearCustomization Clears the icon override previously applied to the referenced condition.
Equals Indicates whether the current ConditionReference is equal to another ConditionReference.
GetHashCode Returns a hash code for the current ConditionReference.

Operators

Operator Description
operator != Compares two ConditionReference values for inequality.
operator == Compares two ConditionReference values for equality.