- Home /
Question by
OliverAnthony · Feb 06, 2014 at 05:01 AM ·
meshfbxvertexdebug.logvertexcolor
Reding from Mesh.colors doesn't display vertex colors of fbx
I have an exported fbx with different vertex colors on it.
This script runs on start:
function Start () {
var mesh : Mesh = GetComponent(MeshFilter).mesh;
var vertices : Vector3[] = mesh.vertices;
var colors : Color[] = new Color[vertices.Length];
for (var i = 0; i < vertices.Length;i++)
{
Debug.Log(colors[i]);
}
}
For some reason the readout is RGBA(0.00, 0.00, 0.00, 0.00) for every vertice, even though many of them should have differing values from this.
Anyone encountered this before?
Comment