Excellence Timeline (ExTimeline)

Hello there!

For my shoot’em up project, I needed some tool to synchronize my background’s animations, the spawns of my enemies and the environmental sounds. There is a lot of timeline tools available on the Unity Asset Store, but none of them answered to my needs, so I made one myself.

The timeline allow to do the following things :

  • Accurately activate game objects in time
  • Synchronize different animated objects using Legacy animations
  • The possibility of having multiple timelines, like an intro movie timeline, a spawners timeline, or to split a level’s events into multiple timelines.

The timeline

The idea of the Timeline was to have a single window to animate and sync multiple objects, using the Legacy animations to do the keyframing and the timeline’s internal timer for the sampling. I wanted it user friendly, so you can drag and drop any scene objects you want into the timeline. Only the timeline will keep references, and will detect if the referenced object have been destroyed.

I don’t intend to manage the Mecanim animations. Such objects will be managed as any other gameobjects.

Here is a short video showing how I reproduce and animate the bridge scene :

The editor

Here’s a more detailed view of the editor :

  1. The main timeline, where you have all your keyframes. You can drag them around or right click to set them at the position of the cursor (the green vertical line).

  2. The ruler, to have a good view where your keyframes are in the timeline. Click and drag the grey triangle to move the cursor.

  3. The game objects’ list.

  4. Your game objects names

  5. A toggle option to use a duration/lifetime to your game object. The game object is activated At the time indicated by the keyframe and deactivated at the end of the duration. Usefull if you want to spawn some particle effects but don’t want to bother with a script to disable them.

  6. Delete buttons, to remove the game object from the timeline. Just remove the reference of the object, it doesn’t delete the gameobject itself. If you delete a game object in the hierarchy, it is automatically removed from the timeline.

  7. A Min Max slider. On really long timeline, it allow to zoom in/out the view to operate on small portions of the timeline.

  8. The range of the Min Max slider on the timeline, and the visible duration of the timeline. The duration is just a convenience, as the timeline duration is up to the last keyframe, but it is usefull if you want to add new keyframes on a later time.

  9. The timelines popup, to select the timeline you want to work on.

If you have a lot of objects, a slider will appear to the right of the timeline, allowing you to scroll vertically.

The vertical separation between the gameobject’s list and the timeline can be moved horizontally if you have some gameobjects with huge names.

Accurate spawn
When spawning multiple objects with a really short delay between each of them, sometimes some objects will look like they spawned all together. It is even more true on low spec devices. Say you want to spawn one object each 20ms, and suddenly you have a 300ms frame. By handling poorly the spawning, you will have 15 objects looking like they spawned at the same time.

In this image, I’m trying to spawn 10 balls, all moving to the right at the same speed, with a Application.frameratelimit set to 5. The balls are spawned each 33ms, but the deltaTime I’ll get will be about 200ms.

I made a component ExUpdater, called by the timeline each time an object is spawn, that will pre update the object with the missing time (deltaTime - spawnTime).

The ball’s mover script will goes from this :

using UnityEngine;

public class Mover : MonoBehaviour {
    public float speed = 5f;

    // Update is called once per frame
    void Update () {
        transform.position += Vector3.right * speed * Time.deltaTime;
    }
}

To this :

using UnityEngine;

public class Mover : MonoBehaviour {
    public float speed = 5f;

    void Awake()
    {
        ExUpdater updater = GetComponent<ExUpdater>();
        if(updater != null)
            updater.preUpdateEvent.AddListener(PreUpdate);
    }

    // Update is called once per frame
    void Update () {
        transform.position += Vector3.right * speed * Time.deltaTime;
    }

    void PreUpdate(float deltaTime)
    {
        transform.position += Vector3.right * speed * deltaTime;
    }
}

PreUpdate do the same thing as Update, except it use a custom delta time and is called by the ExUpdater component, not by Unity itself.

The result :

Furthermore

It is still work in progress, as I want to be able to move the Legacy animations’ keyframe directly from the timeline, without going to the Animation View to edit your animation. The curves will need to be done from the Animation View though.

I also want to add is multi-selection of objects so you can pan multiple keyframes at once.

All said, would you find this kind of tool usefull enough for your projects for me to upload it on the Asset Store?

What price would you be ready to invest for it, depending on the other timeline tools?

(I’ll rework the topic a bit more, I need to go to sleep for tonight.)

1 Like

Updated the initial post with more details.