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

Note

This generic method is available only when developing for Windows.

Initiates a nested build of an additional asset.

Syntax

'Declaration
Public MustOverride Function BuildAsset(Of TInput, TOutput) ( _
         sourceAsset As ExternalReference(Of TInput), _
         processorName As String, _
         processorParameters As OpaqueDataDictionary, _
         importerName As String, _
         assetName As String _
) As ExternalReference(Of TOutput) 
public abstract ExternalReference<TOutput> BuildAsset<TInput,TOutput> (
         ExternalReference<TInput> sourceAsset,
         string processorName,
         OpaqueDataDictionary processorParameters,
         string importerName,
         string assetName
)
public:
generic<typename TInput, typename TOutput>
ExternalReference<TOutput> BuildAsset(
         ExternalReference<TInput> sourceAsset,
         String processorName,
         OpaqueDataDictionary processorParameters,
         String importerName,
         String assetName
) abstract

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

Type: 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.

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.

Requirements

Namespace: Microsoft.Xna.Framework.Content.Pipeline

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

See Also

Conceptual

Parameterized Processors

Reference

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

Platforms

Windows 7, Windows Vista, Windows XP