ColorMatrix code api
Get the ColorMatrix component
ColorMatrix cm = GetComponent<ColorMatrix>();
Get a Matrix API
var myAPI = cm.Matrix("MyMatrix");
Here you can not edit the matrix if it is not a local instance.
// activate the global edit
var myAPI = cm.Matrix("MyMatrix", true);
Change values
All modification are automatically applied (one time per frame).
var myAPI = cm.Matrix("MyMatrix");
if (myAPI != null) {
myAPI.HueRotation = 90f;
myAPI.Inversion = true;
myAPI.Swap = Mat4x4.SwapType.BGR;
//...
}