Loading FBX Dynamically at Runtime?

I want to be sure I’m not missing anything obvious here, as there does not seem to be any built-in functionality to do this.

I want to be able to load an FBX in a compiled Unity application and create the mesh and other components ‘on the fly’ at runtime.

Resource.Load() does not do this, as the resources have to be present and known at the time you build the app.

Asset Bundles look like they might do this, though I would have to build the FBX into an asset bundle before it could then be loaded by my app. Has anyone used asset bundles this way? Are there problems with opening files installed on the user’s hard drive, as opposed to downloading them from the web? I would suspect their might be?

It is looking like I’ll either have to write my own importer or find a third party utility to handle it. Can anyone recommend any?

Thanks.

i have used asset bundles this way… and its the only way to load in an fbx at runtime, short of writing your own fbx loader. Loading an outside source is the same, you use the www class in a coroutine and either have it point to a web address (http://www.myserver.com/myfbx.fbx) or a file location (file://C:\someFileLoacation\myfbx.fbx)

I personally dont like using the asset bundles tho. You need different bundles for different platforms (as in, you make an asset bundle for iOS, you cant use that same bundle for Android) and there is some overhead you need to do when packing multiple assets in one bundle. Basically, you cant see whats in the bundle until you load the whole thing into memory…and even then, unless you made a text file inside the bundle specify what fbxs are in the bundle (part of the overhead), you wont know whats in it in advance to load a single item at once.

Thanks for the quick reply. Did you run into any OS-specific issues related to using a ‘File’ URL for the asset bundle? Like permission / access issues?

The Unity 5 asset bundles system is great now.