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

DebugStyles

class 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

Provides theme-aware visual resources for representing evaluation states when you debug a graph.

The colors adapt to the current Editor theme, so you don't have to track the theme yourself.

Don't rely on colors alone to communicate a debug state. DebugStyles.True and DebugStyles.False differ mainly in hue, so users with a color vision deficiency might not be able to tell them apart. Pair the color with a second visual cue, such as an icon (e.g. ConditionReference.Icon), a dash pattern (e.g. TransitionReference.IsDashed), a line width override (e.g. TransitionReference.WidthOverride) or an animation (e.g. GraphMotion.Play) so that the state remains readable without color.

A graph tool sets a debug color and icon on a transition element:

 using var debugContext = Registry.CreateVisualizationContext(myStateMachine.ID);
 TransitionReference transitionRef = debugContext.GetTransitionReference(myTransition.ID);
 transitionRef.LineColor = DebugStyles.Pending;
 transitionRef.Icon = DebugStyles.PendingIcon;

Static Properties

Property Description
False The suggested color to represent a false or failing state during debug visualization.
FalseIcon The suggested icon to represent a false or failing state during debug visualization.
Pending The suggested color to represent a pending or undetermined state during debug visualization.
PendingIcon The suggested icon to represent a pending or undetermined state during debug visualization.
True The suggested color to represent a true or passing state during debug visualization.
TrueIcon The suggested icon to represent a true or passing state during debug visualization.