struct in Unity.GraphToolkit.Editor.GraphVisualization
Identifies a transition inside a visualization TransitionReference.Context so visualization changes can be applied to it.
Obtain a TransitionReference from Context.GetTransitionReference, providing the
unique identifier of the transition. The reference is only meaningful for the TransitionReference.Context that
produced it. You can use its properties to set, retrieve, or clear customization for that specific transition
in the state machine canvas.
Two TransitionReference values are equal when they share the same TransitionReference.TransitionID and
refer to the same TransitionReference.Context instance.
Additional resources: TransitionReference.Context, Context.GetTransitionReference
using var debugContext = Registry.CreateVisualizationContext(myStateMachine.ID); ITransition startTransition = myStateMachine.GetTransitions(startState, nextState).First();
TransitionReference startTransitionRef = debugContext.GetTransitionReference(startTransition.ID); startTransitionRef.LineColor = DebugStyles.Pending; debugContext.Motion.Play(startTransitionRef);
| Property | Description |
|---|---|
| Context | Visualization context that produced the current transition reference. |
| FillColor | The color the referenced transition's arrow is filled with, or null when no fill color override is applied. |
| Icon | The icon override applied in the transition inspector for the referenced transition, or null when no icon override is applied. |
| IsDashed | Whether the referenced transition is drawn with a dashed pattern. |
| LineColor | The color the referenced transition's wire and arrow border is drawn with, or null when no line color override is applied. |
| Opacity | The opacity multiplier applied to the referenced transition. |
| TransitionID | Unique identifier of the transition this reference points to. |
| WidthOverride | The line width override applied to the referenced transition. |
| Method | Description |
|---|---|
| ClearCustomization | Clears all customization previously applied to the referenced transition. |
| Equals | Indicates whether the current TransitionReference is equal to another TransitionReference. |
| GetHashCode | Returns a hash code for the current TransitionReference. |
| Operator | Description |
|---|---|
| operator != | Compares two TransitionReference values for inequality. |
| operator == | Compares two TransitionReference values for equality. |