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
stream
StreamThe stream to write the XNB file to.
content
objectThe content to write to the XNB file.
targetPlatform
TargetPlatformThe platform the XNB is intended for.
targetProfile
GraphicsProfileThe graphics profile of the target.
compressContent
boolTrue if the content should be compressed.
rootDirectory
stringThe root directory of the content.
referenceRelocationPath
stringThe 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
TypeThe type.
Returns
- ContentTypeWriter
The worker writer.
Remarks
This should be called from the ContentTypeWriter.Initialize method.