// Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 Kybernetik //
#if UNITY_EDITOR
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();
/************************************************************************************************************************/
}
/// [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 AnimancerGraph Animancer;
/// The of the used to play the preview.
public Transform Transform => Animancer.Component.Animator.transform;
/************************************************************************************************************************/
/// Creates a new .
public TransitionPreviewDetails(AnimancerGraph animancer)
{
Animancer = animancer;
}
/************************************************************************************************************************/
}
}
#endif