- Home /
Import fbx using autodesk fbx sdk in real time.
I am currently looking a unity3 as possible platform to base our simulation solution on but I am currently running into an issue that I think can be fixed or worked around.
I need to be able to load .fbx files in run time without the editor so not using asset bundles or resource folders. Now I know there are a number of scripts to load .obj files but I am only able to load .fbx files.
Has anybody used the Autodesk FBX SDK and imported the .dlls into unity3 Pro to enable loading of .fbx file at run time.
Simply informing me that this can be done would help greatly. I could spend a great deal of time trying this path and finding it is not possible because of some issue not present to me at the moment.
Answer by Ray-Pendergraph · Apr 01, 2011 at 12:01 PM
Given the apparent intense resource utilization to do this at design time as it were, I would seriously doubt this is possible. FBX import is a PITA if you have a lot of them (we do) and they are memory intensive to import and they take a long time (relatively). Also, I'm pretty sure that Unity uses an API that comes from Autodesk to manipulate these files and is not something that is licensed to put in a game for runtime.
Answer by Mark G Smith · Apr 04, 2011 at 07:36 AM
The fbx api is available to download from this address http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&id=6837478 and if you are using the pro licence you can import and use .dll to be used in your solution there is no reason that you could not add the fbx.dll's into a unity solution and use these to import into a unity project at run time, I simply wanted to know if anybody else had done this yet? It taking a relatively long time to import at runtime is not an issue with the project we are working on..
If you get it to work I hope you will post back. This has implications in our projects too... more from a tool perspective than 'in-game' though. Happy coding!
Just curious if you figured this out. I am currently on a project and this is the road that we have arrived at. If you could let me know if you were successful at importing FBX files at run time using Autodesks FBX SD$$anonymous$$ it would be great.
I am currently trying to do this myself. I have a Pro license so I can use a .dll. Were you able to get a working solution?
We are still working on it. Currently we have made a dll that will allow us to use the Autodesk SD$$anonymous$$ but we are unable to get unity to work with it. Our latest error is: "$$anonymous$$issing$$anonymous$$ethodException: $$anonymous$$ethod contains unsupported native code" We are thinking this has to do with the CLR not being compiled in clr:safe. In testing with simple dlls we were only able to get dlls to work that we compiled in clr:safe.
If you figure it out, please let us know.
So we rewrote most of our code and compiled it as unmanaged code in Visual Studio without using CLR, and used DllImport in Unity, and it appears that Unity is recognizing it now (we can now use simple functions eg. "return 0;"). However whenever we tried to use any Fbx Sdk functions we get a run time error: "R6034 An Application has made an attempt to load the C runtime library incorrectly." Has anyone gotten past this? We have embedded manifest files and tried several different compiler options, but all to no avail.
Your answer
Follow this Question
Related Questions
Failed loading fbx Importer 3 Answers
Applying lightmap in realtime 0 Answers
Can custom FBX data be imported into Unity ? 1 Answer
Which version of the FBX SDK is used? 1 Answer
Autodesk .FBX animation script in Unity 2 Answers