Version: Unity 7.0 Alpha (7000.0)
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.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961