Hi,
I am trying to add colour to a cube but not able to do that.
Here is my code
GameObject cube = GameObject.CreatePrimitive (PrimitiveType.Cube);
cube.transform.localScale=new Vector3(0.75f,0.75f,0);
cube.AddComponent<Rigidbody> ();
cube.transform.position = new Vector3 (1, 1,0);
cube.tag="TestTag";
cube.renderer.material.color=Color.white;
But the cube is rendered in black colour.
Thanks,
Kumar.