Turn on MeshCollider convex for 2000 objects

Heya,

Im having a problem with some code I have to turn my 2000 car objects (all named ‘Car’) mesh collider to convex. I don’t really want to go threw 2000 object ticking a tick box essentially 2000 times!

The code I have is here -

//-------------------------------

private var Cars : GameObject[];
private var meshCol : Array;

function Start()

{
	Cars = GameObject.FindGameObjectsWithTag("Car");

	meshCol = new Array();

	for (i = 0; i < Cars.length; i++)

	{

		meshCol[i] = Cars[i].GetComponent(MeshCollider) as MeshCollider;

	}
	meshCol.ToBuiltin(MeshCollider);
	for (i = 0; i < meshCol.length; i++)
	{
		meshCol.convex = true;
	}
}

//------------------------------------------------

I’m getting an error message with ‘convex is not a member of Array’

Not sure why :S

Any help would be awesome!

Regards

Chris

meshCol is the name of the Array, you want to access the member in the Array. Have you tried something along the lines of meshCol*.convex = true;*