Export (0) Print
Expand All

Using a Custom Importer or Content Processor

Describes how to use a custom processor or importer in an existing game solution. XNA Game Studio provides standard importers and processors for a number of common file formats used to store basic game assets such as models, materials effects, sprites, textures, and so on.

Bb447743.note(en-us,XNAGameStudio.31).gifNote
For a list of the file formats that these standard importers and processors support, see Standard Importers and Processors.

If you have game assets saved in a format that the standard importers and processors do not support, you may be able to find a custom third-party importer or a processor for XNA Game Studio that supports that file format. If you have enough information about the file format, you can even build your own custom importer or processor, as described in How To: Write a Custom Importer and Processor.

Bb447743.security(en-us,XNAGameStudio.31).gifSecurity Note
Before you open an existing project or component, determine the trustworthiness of the code outside of the Visual Studio designer. Opening projects or components in the Visual Studio designer automatically executes that code on your local machine in the trusted process of VCSExpress.exe or DevEnv.exe.

The following procedure shows how to add such a custom importer and processor to an existing game project. These steps assume that you have copied the new importer or processor to a local subfolder of the game project in question.

To Add a Custom Importer or Processor to a Game Project

  1. Open XNA Game Studio.
  2. Load the solution associated with your game.
  3. From Solution Explorer, right-click the nested content project node, and click Add Reference.
  4. Navigate to the directory containing the assembly with the custom importer or processor, and then add it to the solution.
  5. Save the solution.

The new importer or processor now appears as one of the available choices for importing or processing a newly added game asset.

Community Additions

ADD
Show:
© 2014 Microsoft