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
contentRoot
stringThe desired content root that will get prefixed to the output path.
shouldBuild
boolIndicates if the content should be built or copied.
importer
IContentImporterThe desired IContentImporter to be used for the content building.
processor
IContentProcessorThe desired IContentProcessor to be used for the content building.
outputPath
Func<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
filePath
stringA 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
filePath
stringA 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
filePath
stringA relative path to the content file.
Returns
- string
Desired relative path for the output content.