Description
The InitializeScene
method is responsible for setting up the initial environment for asset previews. This includes creating the world, camera, and lighting necessary for rendering the asset in a scene. This method is asynchronous and returns a Task
, allowing for non-blocking operations.
Usage
To use the InitializeScene
method, you need to have an instance of the AssetPreview
class. Call this method when you need to prepare the scene for rendering an asset. This is typically done before rendering or displaying the asset in the editor.
Example
// Example of using InitializeScene in an AssetPreview context
public async Task SetupAssetPreview()
{
AssetPreview assetPreview = new AssetPreview();
await assetPreview.InitializeScene();
// Further operations such as initializing the asset or rendering can follow
}