ContentProcessorContext.BuildAsset Generic Method (Generic ExternalReference, String, OpaqueDataDictionary, String, String)

Bb195185.note(en-us,XNAGameStudio.41).gifNote
This generic method is available only when developing for Windows.
Initiates a nested build of an additional asset.

Namespace: Microsoft.Xna.Framework.Content.Pipeline
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

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

Type Parameters

TInput
Type of the input.
TOutput
Type of the output.

Parameters

sourceAsset
Type: ExternalReference<TInput>
Reference to the source asset.
processorName
Type: String
Optional processor for this content.
processorParameters
Type: OpaqueDataDictionary
Optional collection of named values available as input to the content processor.
importerName
Type: String
Optional importer for this content.
assetName
Type: String
Optional name of the final compiled content.

Return Value

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.

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.

Windows 7, Windows Vista, Windows XP

Community Additions

ADD
Show: