Class TDEditorGUI
- Namespace
- TDMaker.Editor
- Assembly
- TDMaker.Editor.dll
Shared colors, styles and small IMGUI helpers for the 2D Tower Defense Maker editor tools.
public static class TDEditorGUI
- Inheritance
-
TDEditorGUI
- Inherited Members
Fields
Accent
Accent color used for selection and highlights.
public static readonly Color Accent
Field Value
- Color
EntryColor
Entry marker tint.
public static readonly Color EntryColor
Field Value
- Color
ErrorColor
Error tint.
public static readonly Color ErrorColor
Field Value
- Color
ExitColor
Exit marker tint.
public static readonly Color ExitColor
Field Value
- Color
WarningColor
Warning tint.
public static readonly Color WarningColor
Field Value
- Color
Properties
BoldClipped
Bold label without word wrap, clipped.
public static GUIStyle BoldClipped { get; }
Property Value
- GUIStyle
CanvasBackground
Darker canvas background for timelines and graphs.
public static Color CanvasBackground { get; }
Property Value
- Color
Header
Bold section header.
public static GUIStyle Header { get; }
Property Value
- GUIStyle
LineColor
Thin separator line color.
public static Color LineColor { get; }
Property Value
- Color
MiniCentered
Centered mini label.
public static GUIStyle MiniCentered { get; }
Property Value
- GUIStyle
PanelBackground
Panel background.
public static Color PanelBackground { get; }
Property Value
- Color
RowTint
Alternating row tint.
public static Color RowTint { get; }
Property Value
- Color
SceneLabel
Scene-view label with a dark backdrop for legibility on any background.
public static GUIStyle SceneLabel { get; }
Property Value
- GUIStyle
StatValue
Right-aligned value label for stat tables.
public static GUIStyle StatValue { get; }
Property Value
- GUIStyle
WrapMini
Word-wrapped mini label.
public static GUIStyle WrapMini { get; }
Property Value
- GUIStyle
Methods
Compact(double)
Formats a number compactly ("1.2k").
public static string Compact(double value)
Parameters
valuedouble
Returns
ContrastText(Color)
Black or white, whichever reads better on background.
public static Color ContrastText(Color background)
Parameters
backgroundColor
Returns
- Color
DrawOutline(Rect, Color, float)
Draws a rectangle outline.
public static void DrawOutline(Rect rect, Color color, float width = 1)
Parameters
rectRectcolorColorwidthfloat
FindAll<T>()
All loaded scene objects of a type (unsorted). Wraps the API that changed across Unity 6 minors.
public static T[] FindAll<T>() where T : Object
Returns
- T[]
Type Parameters
T
IsMissingReference(SerializedProperty)
Whether a serialized object reference points at a deleted or missing object.
public static bool IsMissingReference(SerializedProperty property)
Parameters
propertySerializedProperty
Returns
Section(string, string, bool)
Draws a foldout section header whose state persists for the editor session.
public static bool Section(string key, string title, bool defaultOpen = true)
Parameters
Returns
SelectAndPing(Object)
Selects and pings an object.
public static void SelectAndPing(Object target)
Parameters
targetObject
Separator()
Draws a one-pixel horizontal line.
public static void Separator()
StatRow(string, string)
A label/value row for stat tables.
public static void StatRow(string label, string value)
Parameters
TintOf(EntityAssetBase)
Primary tint of an entity asset (its fallback view color), opaque.
public static Color TintOf(EntityAssetBase asset)
Parameters
assetEntityAssetBase
Returns
- Color