Hello!
So I’ve an animated character, that i, on occasion wish to change the vertice color of.
However, since it uses a SkinnedMeshRenderer, there is no way for me to change(or so it seems), the vertex color without used sharedMesh, which seems to change the mesh in the project as well…
This is my code atm.
var orgColors : Color[];
var vertices : Vector3[];
var newColors : Color[];
var overlayColor : Color;
function Start () {
var mesh : Mesh = GetComponent(SkinnedMeshRenderer).sharedMesh;
vertices = mesh.vertices;
orgColors = new Color[vertices.Length];
newColors = new Color[vertices.Length];
for (var i = 0; i < vertices.Length;i++){
orgColors _= mesh.colors*;*_
newColors = orgColors + overlayColor/2;
}
mesh.colors = newColors;
}
So my question is this:
Is there a way to change the vertex colors of the mesh, only in the scene, and not project, whilst using SkinnedMeshRenderer?
Taanks in advance!