Hi there,
Hope someone can help me out, I’m working with .FBX files currently.
I did the following comparison, manually building my unity application leads to a mesh size in editor.log of 1.1 MB, whereas my build script which tries to load the same mesh only loads 13.5 KB. I’m guessing it’s only loading partially.
This is my current code for loading the mesh:
Mesh m = (Mesh)AssetDatabase.LoadAssetAtPath("Assets/Models/scar_h.fbx", typeof(Mesh));
GameObject Go = new GameObject();
Go.AddComponent<MeshFilter>();
Go.AddComponent<MeshRenderer>();
Go.GetComponent<MeshFilter>().mesh = m;
Go.transform.localScale = new Vector3(0.25f, 0.25f, 0.25f);
Go.transform.position = new Vector3(0, 0, 2);
Perhaps I’m doing it the hard way, and should be using different code? (e.g saw a ModelImporter in unity C# api, but idk if that is more appropiate).