ConditionReference
Identifies a condition inside a visualization ConditionReference.Context so visualization changes can be applied to it.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Struct
- Namespace: Unity.GraphToolkit.Editor.GraphVisualization
- Assembly: UnityEditor
- Implements: IEquatable<ConditionReference>
public readonly struct ConditionReference : IEquatable<ConditionReference>
Remarks
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
Examples
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 |
Methods
Method | Description |
|---|---|
| ClearCustomization | Clears the icon override previously applied to the referenced condition. |
| Equals | Indicates whether the current ConditionReference is equal to another object. |
| GetHashCode | Returns a hash code for the current ConditionReference. |
Operators
Operator | Description |
|---|---|
| operator == | Compares two ConditionReference values for equality. |
| operator != | Compares two ConditionReference values for inequality. |