Summary
[Editor-Only] An object that can draw custom GUI elements relating to transitions.
- Assembly
- Animancer
.dll - Namespace
- Animancer
.Editor
graph BT
Type["ITransitionGUI"]
class Type type-node
Syntax
public interface ITransitionGUI
Remarks
Implement this in a custom transition type to give it custom GUI elements.
Example:
using Animancer;
using UnityEngine;
// AttackTransition.cs contains your custom transition type.
public partial class AttackTransition : ClipTransition
{
[SerializeField] private Bounds _HitBox;
[SerializeField] private float _HitStartTime;
[SerializeField] private float _HitEndTime;
// Damage, Knockback, etc.
}
// AttackTransition.Drawer.cs contains the custom GUI for it.
#if UNITY_EDITOR
using Animancer.Editor;
using UnityEditor;
using UnityEngine;
public partial class AttackTransition : ITransitionGUI
{
// See each method for an example.
public void OnPreviewSceneGUI(TransitionPreviewDetails details) { }
public void OnTimelineBackgroundGUI() { }
public void OnTimelineForegroundGUI() { }
}
#endif
Methods
Name | Value | Summary |
---|---|---|
OnPreviewSceneGUI |
void |
Called while drawing the GUI for the
Animancer.Editor.Previews.TransitionPreviewWindow scene. |
On |
void |
Called while drawing the background GUI for the
Animancer.Editor.TimelineGUI for the
Animancer.IHasEvents.Events .
|
On |
void |
Called while drawing the foreground GUI for the
Animancer.Editor.TimelineGUI for the
Animancer.IHasEvents.Events .
|