Import a 3D model in Game (during runtime in GUI)

Hi guys , i am creating an editor or something like that … where you can create your own model from cubes , spheres … but what is important for me … is it possible in unity to import a 3D model during gameplay through GUI ? i mean i will click on “import model button” and a file explorer will apear , i choose my model and it will place it to 0,0,0 for example … ??

Thanks

Take a look at this wiki page:
http://wiki.unity3d.com/index.php?title=ObjImporter

Attach this to something and then call ImportFile(“path here”) which will return an object of the type “Mesh”.
Then you can easily instantiate an empty gameObject with a MeshRenderer and assign the imported mesh to it:

GameObject emptyPrefabWithMeshRenderer;
String meshPath;
GameObject spawnedPrefab;
Mesh importedMesh=GetComponent("ObjImporter").ImportFile(meshPath);
spawnedPrefab=Instantiate(emptyPrefabWithMeshRenderer,transform.position,transform.rotation);
spawnedPrefab.GetComponent(MeshFilter).mesh = importedMesh;

Hi, i used the ObjImporter to download an obj from the web.

Is there any way to read also materials and apply to the GameObject?

@markmesiter88

Might not be helpful but you could it in the http://wiki.unity3d.com/index.php?title=ObjImporter file.