Class PipelineProcessorContext
- 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
PipelineManagerpipelineEvent
PipelineBuildEvent
Properties
BuildConfiguration
Gets the name of the current content build configuration.
public override string BuildConfiguration { get; }
Property Value
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
Logger
Gets the logger interface used for status messages or warnings.
public override ContentBuildLogger Logger { get; }
Property Value
OutputDirectory
Gets the output path of the content processor.
public override string OutputDirectory { get; }
Property Value
OutputFilename
Gets the output file name of the content processor.
public override string OutputFilename { get; }
Property Value
Parameters
Gets the collection of parameters used by the content processor.
public override OpaqueDataDictionary Parameters { get; }
Property Value
SourceIdentity
Gets the ContentIdentity representing the source asset imported.
public override ContentIdentity SourceIdentity { get; }
Property Value
TargetPlatform
Gets the current content build target platform.
public override TargetPlatform TargetPlatform { get; }
Property Value
TargetProfile
Gets the current content build target profile.
public override GraphicsProfile TargetProfile { get; }
Property Value
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
stringName 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
stringThe 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
stringOptional processor for this content.
processorParameters
OpaqueDataDictionaryOptional collection of named values available as input to the content processor.
importerName
stringOptional 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
stringOptional processor for this content.
processorParameters
OpaqueDataDictionaryOptional collection of named values available as input to the content processor.
importerName
stringOptional importer for this content.
assetName
stringOptional 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
TInputSource content to be converted.
processorName
stringOptional processor for this content.
processorParameters
OpaqueDataDictionaryOptional 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.