Table of Contents

Class PipelineProcessorContext

Namespace
MonoGame.Framework.Content.Pipeline.Builder
Assembly
MonoGame.Framework.Content.Pipeline.dll
public class PipelineProcessorContext : ContentProcessorContext
Inheritance
PipelineProcessorContext
Inherited Members

Constructors

PipelineProcessorContext(PipelineManager, PipelineBuildEvent)

public PipelineProcessorContext(PipelineManager manager, PipelineBuildEvent pipelineEvent)

Parameters

manager PipelineManager
pipelineEvent PipelineBuildEvent

Properties

BuildConfiguration

Gets the name of the current content build configuration.

public override string BuildConfiguration { get; }

Property Value

string

IntermediateDirectory

Gets the path of the directory that will contain any intermediate files generated by the content processor.

public override string IntermediateDirectory { get; }

Property Value

string

Logger

Gets the logger interface used for status messages or warnings.

public override ContentBuildLogger Logger { get; }

Property Value

ContentBuildLogger

OutputDirectory

Gets the output path of the content processor.

public override string OutputDirectory { get; }

Property Value

string

OutputFilename

Gets the output file name of the content processor.

public override string OutputFilename { get; }

Property Value

string

Parameters

Gets the collection of parameters used by the content processor.

public override OpaqueDataDictionary Parameters { get; }

Property Value

OpaqueDataDictionary

SourceIdentity

Gets the ContentIdentity representing the source asset imported.

public override ContentIdentity SourceIdentity { get; }

Property Value

ContentIdentity

TargetPlatform

Gets the current content build target platform.

public override TargetPlatform TargetPlatform { get; }

Property Value

TargetPlatform

TargetProfile

Gets the current content build target profile.

public override GraphicsProfile TargetProfile { get; }

Property Value

GraphicsProfile

Methods

AddDependency(string)

Adds a dependency to the specified file. This causes a rebuild of the file, when modified, on subsequent incremental builds.

public override void AddDependency(string filename)

Parameters

filename string

Name of an asset file.

AddOutputFile(string)

Add a file name to the list of related output files maintained by the build item. This allows tracking build items that build multiple output files.

public override void AddOutputFile(string filename)

Parameters

filename string

The name of the file.

BuildAndLoadAsset<TInput, TOutput>(ExternalReference<TInput>, string, OpaqueDataDictionary, string)

Initiates a nested build of the specified asset and then loads the result into memory.

public override TOutput BuildAndLoadAsset<TInput, TOutput>(ExternalReference<TInput> sourceAsset, string processorName, OpaqueDataDictionary processorParameters, string importerName)

Parameters

sourceAsset ExternalReference<TInput>

Reference to the source asset.

processorName string

Optional processor for this content.

processorParameters OpaqueDataDictionary

Optional collection of named values available as input to the content processor.

importerName string

Optional importer for this content.

Returns

TOutput

Copy of the final converted content.

Type Parameters

TInput

Type of the input.

TOutput

Type of the converted output.

Remarks

An example of usage would be a mesh processor calling BuildAndLoadAsset to build any associated textures and replace the original .tga file references with an embedded copy of the converted texture.

BuildAsset<TInput, TOutput>(ExternalReference<TInput>, string, OpaqueDataDictionary, string, string)

Initiates a nested build of an additional asset.

public override ExternalReference<TOutput> BuildAsset<TInput, TOutput>(ExternalReference<TInput> sourceAsset, string processorName, OpaqueDataDictionary processorParameters, string importerName, string assetName)

Parameters

sourceAsset ExternalReference<TInput>

Reference to the source asset.

processorName string

Optional processor for this content.

processorParameters OpaqueDataDictionary

Optional collection of named values available as input to the content processor.

importerName string

Optional importer for this content.

assetName string

Optional name of the final compiled content.

Returns

ExternalReference<TOutput>

Reference to the final compiled content. The build work is not required to complete before returning. Therefore, this file may not be up to date when BuildAsset returns but it will be available for loading by the game at runtime.

Type Parameters

TInput

Type of the input.

TOutput

Type of the output.

Remarks

An example of usage for BuildAsset is being called by a mesh processor to request that any related textures used are also built, replacing the original TGA file references with new references to the converted texture files.

Convert<TInput, TOutput>(TInput, string, OpaqueDataDictionary)

Converts a content item object using the specified content processor.

public override TOutput Convert<TInput, TOutput>(TInput input, string processorName, OpaqueDataDictionary processorParameters)

Parameters

input TInput

Source content to be converted.

processorName string

Optional processor for this content.

processorParameters OpaqueDataDictionary

Optional parameters for the processor.

Returns

TOutput

Reference of the final converted content.

Type Parameters

TInput

Type of the input content.

TOutput

Type of the converted output.