Table of Contents

Class ContentImporter<T>

Namespace
Microsoft.Xna.Framework.Content.Pipeline
Assembly
MonoGame.Framework.Content.Pipeline.dll

Implements a file format importer for use with game assets. Importers, either provided by the framework or written by a developer, must derive from ContentImporter, as well as being marked with a ContentImporterAttribute. An importer should produce results in the standard intermediate object model. If an asset has information not supported by the object model, the importer should output it as opaque data (key/value attributes attached to the relevant object). By following this procedure, a content pipeline can access specialized digital content creation (DCC) tool information, even when that information has not been fully standardized into the official object model. You can also design custom importers that accept and import types containing specific third-party extensions to the object model.

public abstract class ContentImporter<T> : IContentImporter

Type Parameters

T
Implements a file format importer for use with game assets. Importers, either provided by the framework or written by a developer, must derive from ContentImporter, as well as being marked with a ContentImporterAttribute. An importer should produce results in the standard intermediate object model. If an asset has information not supported by the object model, the importer should output it as opaque data (key/value attributes attached to the relevant object). By following this procedure, a content pipeline can access specialized digital content creation (DCC) tool information, even when that information has not been fully standardized into the official object model. You can also design custom importers that accept and import types containing specific third-party extensions to the object model.
Inheritance
ContentImporter<T>
Implements
Derived
Inherited Members

Constructors

ContentImporter()

Initializes a new instance of ContentImporter.

protected ContentImporter()

Methods

Import(string, ContentImporterContext)

Called by the framework when importing a game asset. This is the method called by XNA when an asset is to be imported into an object that can be recognized by the Content Pipeline.

public abstract T Import(string filename, ContentImporterContext context)

Parameters

filename string

Name of a game asset file.

context ContentImporterContext

Contains information for importing a game asset, such as a logger interface.

Returns

T

Resulting game asset.