'mesh' is not a member of 'UnityEngine.Component' in Iphone

Hi All,

am using the below.
var mesh : Mesh = GetComponent(MeshFilter).mesh;
var vertices = mesh.vertices;
It showing ‘mesh’ is not a member of ‘UnityEngine.Component’ error in unity iphone.

How to rectify this error.

Thanks

Thanks for reply.

you can do it like this:

var tmpMeshFilter : MeshFilter = GetComponent(MeshFilter);
var mesh : Mesh = tmpMeshFilter.mesh;