Transition Assets

A TransitionAsset is a ScriptableObject which contains a Transition.

  • You can create transition assets using the Assets/Create/Animancer/Transition Asset menu function.
  • The Library Character sample demonstrates how to use them.
Inline Transition Transition Asset
using Animancer;
using UnityEngine;

public class InlineExample : MonoBehaviour
{
    [SerializeReference] 
    private ITransition _Animation;
}
using Animancer;
using UnityEngine;

public class AssetExample : MonoBehaviour
{
    [SerializeField] 
    private TransitionAsset _Animation;
}
The field is configured directly in the Inspector of the script that will use it. An asset must be created separately, then you can give the script a reference to it in the Inspector.
Multiple instances of a character will each have their own copy of the transition details which is usually a waste of memory. Multiple instances of a character will all reference the same asset so any modifications will apply to everything that uses it.
Normally when referencing another object like this you need to select that object to view or edit its values, but if you have Inspector Gadgets Pro it shows a foldout arrow on the Object Field to show the referenced object's Inspector without changing your selection.
  • Transition Assets can also be created in code using ScriptableObject.CreateInstance<TransitionAsset>().