Animation
Interface
Animation plugin
(monobehaviour : ColorMatrixAnimationPlugin)
Add local matrices in the animation window Here, a matrix at time = 0 and another at time = 0.5.
Unity Animation plugin
(monobehaviour : ColorMatrixUnityAnimationPlugin) With the UnityAnimation plugin, you can directly change animations values in unity animation window. (and use "record mode")
Programmatically
Plugins are MonoBehaviours and you can edit their values direcly.
using System.Linq;
//...
ColorMatrixAnimationPlugin[] animations = GetComponents<ColorMatrixAnimationPlugin>().OrderBy(p => p.Index).ToArray();
// set the first animation to 50%
if (animations.Length > 0) {
_animations[0].IsActive = true;
_animations[0].Position = 0.5f;
}
The effect will be automatically applied if IsActive and Position have been changed.