

R2API.Animations is a submodule assembly for R2API that allows mod creators to modify existing RuntimeAnimatorController at runtime.
You can add:
Since applying modifications to a controller is somewhat complicated and slow operation, the changes are cached.
The cache for a controller is rebuilt when a mod version is changed.
For development there is a config option IgnoreCache, so that you don't have to constantly change mod version or manually delete cache.
When imported into Unity, adds an option in context menu Create/R2API/Animations/AnimatorDiff. In AnimatorDiff you specify Modified Controller which should have all things that Source Controller has + your modifications.
To create Modified Controller use option Assets/R2API/Animation/Copy AnimatorController for modification in context menu on a Source Controller.
After that you add the AnimatorDiff to an AssetBundle and in code you can create an instance of AnimatorModifications with AnimatorModifications.CreateFromDiff().
StateMachines.Copy AnimatorController for modification button to context menu in Unity.ClipBundlePath is no longer required for State and ChildMotion.IgnoreCache to true.BlendTrees.AnimatorDiff that you can create inside editor and load at runtime.NewStates and NewTransitions dictionaries are now lists