1
\$\begingroup\$

I'm trying to create some kind of editor in Windows Forms for XNA and I was wondering if there's anyway to do this:

Load content (known types, like Model/SpriteFont/Effect/Texture) through OpenFileDialog, then Process it to an *.xnb file and finally be able to add it to a datacontainer, so you can use it in an editor.

Is this possible, and since I only want to use known types that already have Importers/Processors - what is the best way to go about doing this?

Because for me, to just manually have to add content when later creating the game logic and having everything set up in the editor feels very static.

So simply put, I want to be able to load content and process it and later be able to store it so when I create a game using this I can add a DataContainer that I can change and add to in the editor as well as use in the game.

Doing Content.Load() 2000 times later in the game feels like a time waster.

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Yes, this is possible. The starting point for this is the XNA WinForms 2 sample.

The documentation with that sample will explain how to process content within your application and load it. It is also the starting point for writing that content out as an XNB file (IIRC, the sample almost does this - you just have to modify it to write the output somewhere useful).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .