Import Obj(wavefront) at Runtime via Script

I use 3ds max to export Obj file. With a cube(1x1x1), it has a 8 vertices, 12 face(triangles).

I’m confusing about uvs and texture-coordinate, Is it a same thing?

Because when I unwrapUVW in different way, I got a output file(.Obj) in different texture-coordinate size.

1).the problem is mesh.uv must have a same array size of mesh.vertices.

How can i deal with?

2). Face (Vertex/texture-coordinate)

f 4/11 2/12 1/9

f 1/9 3/10 4/11

How to deal with texture-coordinate in the face array??

Thank.

[Solve] http://forum.unity3d.com/threads/180901-UV-map-via-Script?p=1236776&viewfull=1#post1236776

Unity wants UV coordinates per-face and not per-vertex. Eric (I think) wrote an OBJ importer that I believe is in the asset store - so maybe look into that and save yourself some time and hassle.

http://www.starscenesoftware.com/Utilities.html#ObjReader

Coincidentally, I just released ObjReader 2.0, with .mtl file support (not on the Unity asset store just yet, but it’s on my site now). Getting .obj files to work is somewhat tricky, especially since the specs are a bit vague and different apps output .obj files in different ways. So I’d recommend ObjReader if you want to save a lot of time.

–Eric