Loading a mesh from an .fbx through Resource.Load()

Hello everyone,

I’m trying to dynamically load a mesh from an .fbx file through Resource.Load(). I want this mesh to be used by other GameObjects.

In my code I’m trying to load an fbx file with the name p_w0_120x120_n-01.fbx. Here is a code snippet of my current code:

GameObject testModel = (GameObject) Resources.Load("Models/exports/test/" + elementData.modelName);
GameObject.Instantiate(testModel, new Vector3(0, 0, 0), Quaternion.identity);

MeshFilter filter1 = (MeshFilter)testModel.GetComponent(typeof(MeshFilter));
MeshFilter filter2 = (MeshFilter) floor.getElementsPrefabs()[j].GetComponent(typeof (MeshFilter));
filter2.mesh = filter1.mesh;

The problem is that when I try to execute this code, the mesh in testModel gets renamed from p_w0_120x120_n-01 to p_w0_120x120_n-01 Instance. When I then exit the game, the fbx in my projectpane somehow loses the mesh it had in its meshFilter. When I then run the game again, testModel has its former mesh again(p_w0_120x120_n-01 ) but when you double click on the mesh it is completely empty(0 verts, 0 tris etc.) and it doesn’t link to a mesh in the project pane. Does anyone know what causes this behaviour? How can I fix this so that I can copy the mesh from one MeshFilter to another?

anyone?