Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- namespace JasonStorey
- {
- public class Gizmo
- {
- private static GUIStyle _labelStyle;
- protected static GUIStyle LabelStyle => _labelStyle ?? (_labelStyle = new GUIStyle());
- public static void DrawLabel(Vector3 position, string label) => DrawLabel(position, label, Color.white);
- public static void DrawLabel(Vector3 position, string label,Color color)
- {
- #if UNITY_EDITOR
- LabelStyle.normal.textColor = color;
- UnityEditor.Handles.Label(position,label,_labelStyle);
- #endif
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement