Animation API

This project shows a full Response Curve Editor and showcases several other Animation API features

About

A Response Curve editor lets you edit any animation curve exposed in a script behaviour. An example of using the Animation Event API to invoke script functions at specific times in the AnimationClip A simple example of creating a skinned mesh and animation clip procedurally. An example of animating material properties.

Details

The project has several scenes showing different effects:

Response Curve Editor
An Editor Script that lets you edit any Animation Curve in serialized in a Script behaviour. It's essentially the same as exposing a color property to the inspector with a default value and then tweaking it. All Animation Curves in the selected objects which are exposed to the inspector, you can then edit them in a graph view. It's very useful for tweaking gameplay. For example you could feed input through an animation curve in order to make a characters speed accelerate by artist tweaked curve.

Exposing a Response Curve it's as simple as this:

var myCurve = AnimationCurve.Linear(0, 0, 1, 1);

function Update ()
{
   transform.position.x = Time.time;
   transform.position.y = myCurve.Evaluate(Time.time);
}
Material Animation
All material properties can now be animated. This gives an example of how to do it.
ProceduralSkinnedMesh
A simple example of creating a skinned mesh and animation clip procedurally.