How Do You Add Or Remove Clips At Runtime With Mecanim?
- I want to add or remove animation clips in the animation controller at runtime.
You are trying to do one of the following:
- Set up a new animation clip at runtime using Mecanim.
- Change or Remove an animation clip during runtime.
It is not possible to add or remove clips at runtime with Mecanim, but you can override them with AnimatorOverrideController to dynamically change the animation clips.
In Unity 5.2 there is a new Playable API that will allow you to play clips on Animator components without a controller.
This article applies to Unity version 5.1.1f1