// Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2023 Kybernetik // #if UNITY_EDITOR using UnityEditor; using UnityEngine; namespace Animancer.Editor { /// [Editor-Only] An object that can draw custom GUI elements relating to transitions. /// https://kybernetik.com.au/animancer/api/Animancer.Editor/ITransitionGUI /// public interface ITransitionGUI { /************************************************************************************************************************/ /// Called while drawing the GUI for the scene. void OnPreviewSceneGUI(TransitionPreviewDetails details); /// /// Called while drawing the background GUI for the for the /// . /// void OnTimelineBackgroundGUI(); /// /// Called while drawing the foreground GUI for the for the /// . /// void OnTimelineForegroundGUI(); /************************************************************************************************************************/ } } namespace Animancer.Editor { /// [Editor-Only] Details about the current preview used by . /// https://kybernetik.com.au/animancer/api/Animancer.Editor/TransitionPreviewDetails /// public readonly struct TransitionPreviewDetails { /************************************************************************************************************************/ /// The used to play the preview. public readonly AnimancerPlayable Animancer; /// The of the used to play the preview. public Transform Transform => Animancer.Component.Animator.transform; /************************************************************************************************************************/ /// The representing the target transition. public static SerializedProperty Property => TransitionDrawer.Context.Property; /// The current . public static ITransitionDetailed Transition => TransitionDrawer.Context.Transition; /************************************************************************************************************************/ /// Creates a new . public TransitionPreviewDetails(AnimancerPlayable animancer) { Animancer = animancer; } /************************************************************************************************************************/ } } #endif