Table of Contents

Class ContentCompiler

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

Provides methods for writing compiled binary format.

public sealed class ContentCompiler
Inheritance
ContentCompiler
Inherited Members

Constructors

ContentCompiler()

Initializes a new instance of ContentCompiler.

public ContentCompiler()

Methods

Compile(Stream, object, TargetPlatform, GraphicsProfile, bool, string, string)

Write the content to a XNB file.

public void Compile(Stream stream, object content, TargetPlatform targetPlatform, GraphicsProfile targetProfile, bool compressContent, string rootDirectory, string referenceRelocationPath)

Parameters

stream Stream

The stream to write the XNB file to.

content object

The content to write to the XNB file.

targetPlatform TargetPlatform

The platform the XNB is intended for.

targetProfile GraphicsProfile

The graphics profile of the target.

compressContent bool

True if the content should be compressed.

rootDirectory string

The root directory of the content.

referenceRelocationPath string

The path of the XNB file, used to calculate relative paths for external references.

GetTypeWriter(Type)

Retrieves the worker writer for the specified type.

public ContentTypeWriter GetTypeWriter(Type type)

Parameters

type Type

The type.

Returns

ContentTypeWriter

The worker writer.

Remarks

This should be called from the ContentTypeWriter.Initialize method.