// Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 Kybernetik // #if UNITY_EDITOR using System; using UnityEditor; namespace Animancer.Editor { /// [Editor-Only] /// A default which simply draws the . /// /// https://kybernetik.com.au/animancer/api/Animancer.Editor/LabelGUI [CustomGUI(typeof(object))] public class LabelGUI : CustomGUI { /************************************************************************************************************************/ /// public override void DoGUI() { string text; try { text = Value != null ? Value.ToString() : "Null"; } catch (Exception exception) { text = exception.ToString(); } using (var value = PooledGUIContent.Acquire(text)) EditorGUILayout.LabelField(Label, value); } /************************************************************************************************************************/ } } #endif