- Home /
Import 3D model into game through code???
Hello, I've been recently wanting to make a game where even after it is built, people can make mods for it and a part of that is people making their own models for it. Is there a way I can read from a .blend OR .fbx file or any 3d file in general and have it show up in the scene?
Edit, Im not talking about placing the fbx in the Resources folder. I mean straight up import it from a file anywhere on the computer.
Answer by Arkaid · Jul 12, 2016 at 03:26 AM
Short of writing your own code to parse the data file and build a mesh from scratch, I don't think you can.
Mostly because when unity compiles the project, it optimizes meshes and textures for that platform in particular, then packages into the binary. It doesn't provide any utilities for loading game data during runtime other than asset bundles (which are also precompiled and targeted to each platform).
So, other than reading the mesh data from the file and creating your own parser, you're out of luck.
Now if you're willing to shell out the cash, there are assets in the store that do exactly that
https://www.assetstore.unity3d.com/en/#!/content/19579 https://www.assetstore.unity3d.com/en/#!/content/3147 https://www.assetstore.unity3d.com/en/#!/content/49547 << FREE! (Wavefront OBJs)
Your answer
Follow this Question
Related Questions
Problem with all my scripts (Not Working Properly) 1 Answer
dictionary of words (as a key) and fbx files (as a value) 1 Answer
Custom Export and Import FBX Data 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers