Sdílet prostřednictvím


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

Note

This generic method is available only when developing for Windows.

Initiates a nested build of the specified asset and then loads the result into memory.

Syntax

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

Type Parameters

  • TInput
    Type of the input.
  • TOutput
    Type of the converted 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.

Return Value

Type: TOutput
Copy of the final converted content.

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.

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