Are there some other way to load the content without generating .xnb file in XNA??

Started by
1 comment, last by MJP 15 years, 1 month ago
Hey: i'm quite confused by the contentManager of the XNA. if i want to load some thing from file , i have to generate the .xnb file which cost me some time. Suppose i want to load a scene which contains fifty models in an editor, i have to generate them each , and then load .xnb. But if i want to add another model (fbx or x) , then the contentbuilder will delete some of the generated xnb file in the destination dir ( i don't know why , and neither can i solve it ). It confuses me a lot when i'm ready to make a editor for XNA in the WinForm. The sample of the WinFormContentLoading Sample can't help , because it only generate ONE temporary .xnb file , while i want mutiple models to be loaded ( not load once , may be twice, first time 10 models and then 20 models from file ). I've no idea how to solve the problem, any idea is really appreciated!!! THANKS A LOT!!!!!
Advertisement
There is no built in way to load Models directly from FBX or X at runtime. You can implement your own reader (or find one online) of those files and build your own structure of VertexBuffers and IndexBuffers and use those.
You can do whatever you want with the .xnb file once you've compiled it. Just copy them over to some other folder if you don't want it to be overwritten.

This topic is closed to new replies.

Advertisement