Unity Tip: Animation Curve Graphs

Recently I found out about a clever and helpful option when you need to visualize Unity data in a graph-like form in the editor.

Vincent Taylor
Nerd For Tech
2 min readOct 14, 2021

--

Animation Curves:

Animation Curves are a feature of Unity commonly used for visualizing and creating animations with Unity’s inbuilt Animation system.

However, they can also be repurposed for a variety of uses outside of animation. For example, I made a dynamic flower mesh using Animation Curves for the length/width/height not long ago.

Animation Curves as a graph:

Animation Curves can also act as a visual graph which is populated at runtime with whatever numeric data values you want.

An Animation Curve graph being populated at runtime.
A graph showing the height of a foot during a step from point A to point B.

Creating the graph:

In any MonoBehaviour C# script, create a new Animation Curve variable. Animation Curves are a part of the UnityEngine namespace.

The above example in practice

Now you can see that any numeric data can be added to this to make a convenient graph of points. This is a great and easy way to get a visual representation of your game data.

--

--

Vincent Taylor
Nerd For Tech

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.