ContentCompiler¶
-
class
ContentCompiler
: System.Object Provides methods for writing compiled binary format.
-
public ContentTypeWriter
GetTypeWriter
(System.Type type) Retrieves the worker writer for the specified type.
Parameters: - type (System.Type) – The type.
Returns: The worker writer.
-
public void
Compile
(System.IO.Stream stream, System.Object content, TargetPlatform targetPlatform, GraphicsProfile targetProfile, bool compressContent, string rootDirectory, string referenceRelocationPath) Write the content to a XNB file.
Parameters: - stream (System.IO.Stream) – The stream to write the XNB file to.
- content (System.Object) – The content to write to the XNB file.
- targetPlatform (Microsoft.Xna.Framework.Content.Pipeline.TargetPlatform) – The platform the XNB is intended for.
- targetProfile (Microsoft.Xna.Framework.Graphics.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.
-
public ContentTypeWriter