Skip to main content

Overview

A procedural animation feature consists of 2 entities:
  • FPSAnimatorLayerSettings: a Scriptable Object that contains all the data.
  • IAnimationLayerJob: a struct that executes custom animation logic.
Tip: the framework uses the Animation Job System, which ensures solid performance even with a large number of characters.
If you open up the source code of the framework, you will notice that every layer has its own folder with 2 .cs files: FPSAnimatorLayerSettings class is responsible not just for containing the data, but for instantiating the IAnimationLayerJob as well: CreateAnimationJob() method must return a new instance of the desired IAnimationLayerJob-type. When you link a new Animator Profile, the system iterates over all animation features (Layer Settings) and then invokes the CreateAnimationJob() method to create the Layer State.

Example

First, create a new FPSAnimatorLayerSettings-derived class for data, and IAnimationLayerJob-implemented struct:
In the next chapter, we will learn how to work with the demo project.