ContentProcessorContext.BuildAndLoadAsset Generic Method (Generic ExternalReference, 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 Function BuildAndLoadAsset(Of TInput, TOutput) ( _
sourceAsset As ExternalReference(Of TInput), _
processorName As String _
) As TOutput
public TOutput BuildAndLoadAsset<TInput,TOutput> (
ExternalReference<TInput> sourceAsset,
string processorName
)
public:
generic<typename TInput, typename TOutput>
TOutput BuildAndLoadAsset(
ExternalReference<TInput> sourceAsset,
String processorName
)
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.
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
Reference
ContentProcessorContext Class
ContentProcessorContext Members
Microsoft.Xna.Framework.Content.Pipeline Namespace
Platforms
Windows 7, Windows Vista, Windows XP