Recommendations on managing and finding animations within a project

I’m looking for best practices on the storage and naming of animation sequences and the best way to figure out what animations are available in an existing project.

For instance, many animations are 1 step in a larger sequence of animations, so if I select the object, and then replay the animation sometimes its a very short one and making sense of it is difficult.

Are there some organization tools to help me find associated animations (Unity animations, not model animations) Or select an animation, and then have it find all the objects that use it? Or what about selecting an animation, and then with a button press, it goes into the scene, and finds any instance of an object who’s properties and recursive children match up with the naming of the animation nodes?

Any advice of what people do to simplify there management of Unity animations would be appreciated.

I’m adding a note on a path I’ve started taking. I’ve created a very simple Script called SceneEvent. It has a method called invoke, and a UnityEvent. Under my object, I create an Empty object, called Events, and then create different children with names matching the animation purposes. Then add scene event, and set that up to call the appropriate animation. My scripts then reference SceneEvents.

This makes the animations highly visible, and can be executed either by things referencing scene events, or by a separate UnityEvent. This has proven 10 times easier than having to flip through multiple panels, and then re-select the object. after having selected the animation, so I can test and see what it does. That process has been a pain.

This process is 10 times easier, where I can just click Invoke (a custom inspector button that triggers the event) and see what happens. So much easier. I might include a description field to optionally add detail to what happens. Additionally, the triggering of it, at present, logs the “Event: [name]” making it easy to track the order of execution and debug.

Here is the code sample, if anyone is interested:

using System.Collections;
using System.Collections.Generic;
using TMPro;
using UniRx;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
#if (UNITY_EDITOR)
using UnityEditor;
#endif

namespace Dvs.VirtualTheatre
{
    public class SceneEvent : MonoBehaviour
    {
        public UnityEvent Event;

        public void InvokeEvent()
        {
            Event.Invoke();
        }
    }

#if(UNITY_EDITOR)
    [CustomEditor(typeof(SceneEvent))]
    public class SceneEventEditor : Editor
    {
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();
            if (GUILayout.Button("Invoke"))
            {
                ((SceneEvent)target).InvokeEvent();
            }
        }
    }
#endif
}

I’d be interested to get other people’s take on this as well.

  • Thanks.