ContentProcessorContext.BuildAsset Generic Method (Generic ExternalReference, String)

Note

This generic method is available only when developing for Windows.

Initiates a nested build of an additional asset.

Syntax

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

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.

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

Reference

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

Platforms

Windows 7, Windows Vista, Windows XP