Class ContentCompiler
- 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
streamStreamThe stream to write the XNB file to.
contentobjectThe content to write to the XNB file.
targetPlatformTargetPlatformThe platform the XNB is intended for.
targetProfileGraphicsProfileThe graphics profile of the target.
compressContentboolTrue if the content should be compressed.
rootDirectorystringThe root directory of the content.
referenceRelocationPathstringThe 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
typeTypeThe type.
Returns
- ContentTypeWriter
The worker writer.
Remarks
This should be called from the ContentTypeWriter.Initialize method.