Table of Contents

Class ContentInfo

Namespace
MonoGame.Framework.Content.Pipeline.Builder
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 string

The desired content root that will get prefixed to the output path.

shouldBuild bool

Indicates if the content should be built or copied.

importer IContentImporter

The desired IContentImporter to be used for the content building.

processor IContentProcessor

The 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

string

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

IContentImporter

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

IContentProcessor

ShouldBuild

true if the content should be built, false if the content should be copied.

public bool ShouldBuild { get; init; }

Property Value

bool

Methods

GetOutputPath(string)

Gets the desired output path for the current ShouldBuild operation.

public string GetOutputPath(string filePath)

Parameters

filePath string

A relative path to the content file (without extension in case of build action).

Returns

string

Desired relative path for the output content.