Share via


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

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)

Syntax

public 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
    Reference to the source asset.
  • processorName
    Optional processor for this content.
  • processorParameters
    Optional collection of named values available as input to the content processor.
  • importerName
    Optional importer for this content.
  • assetName
    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.

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.

See Also

Reference

ContentProcessorContext Class
ContentProcessorContext Members
Microsoft.Xna.Framework.Content.Pipeline Namespace

Platforms

Windows XP SP2, Windows Vista