Class ContentInfo
- Assembly
- MonoGame.Framework.Content.Pipeline.dll
Describes how the ContentBuilder should handle the content.
public class ContentInfo
- Inheritance
-
ContentInfo
- Inherited Members
Constructors
ContentInfo(string, bool, IContentImporter?, IContentProcessor?, Func<string, string>?)
Describes how the ContentBuilder should handle the content.
public ContentInfo(string contentRoot = "", bool shouldBuild = true, IContentImporter? importer = null, IContentProcessor? processor = null, Func<string, string>? outputPath = null)
Parameters
contentRootstringThe desired content root that will get prefixed to the output path.
shouldBuildboolIndicates if the content should be built or copied.
importerIContentImporterThe desired IContentImporter to be used for the content building.
processorIContentProcessorThe desired IContentProcessor to be used for the content building.
outputPathFunc<string, string>The desired output path to be setup based on the input path to the content.
Properties
ContentRoot
A relative path to be used as a prefix to the output path.
public string ContentRoot { get; init; }
Property Value
Importer
An IContentImporter to be used for the building, if its not specified, the system will use reflection to try to figure out an apropriate importer.
public IContentImporter? Importer { get; init; }
Property Value
Processor
An IContentProcessor to be used for the building, if its not specified, the system will use reflection to try to figure out an apropriate processor.
public IContentProcessor? Processor { get; init; }
Property Value
ShouldBuild
true if the content should be built, false if the content should be copied.
public bool ShouldBuild { get; init; }
Property Value
Methods
GetDefaultCopyPath(string)
Gets the default relative output filepath when copying content. By default input and output relative paths match.
public static string GetDefaultCopyPath(string filePath)
Parameters
filePathstringA relative path to the content file.
Returns
- string
Desired relative path for the coppied content.
GetDefaultOutputPath(string)
Gets the default relative output filepath when building content. By default only the extension gets replaced with .xnb extension.
public static string GetDefaultOutputPath(string filePath)
Parameters
filePathstringA relative path to the content file.
Returns
- string
Desired relative path for the built content.
GetOutputPath(string)
Gets the desired output path for the current ShouldBuild operation.
public string GetOutputPath(string filePath)
Parameters
filePathstringA relative path to the content file.
Returns
- string
Desired relative path for the output content.