Description
The WithDynamicUsage
method is part of the Texture3DBuilder
class in the Sandbox namespace. This method configures the texture to be created with dynamic usage, allowing it to be updated frequently. This is particularly useful for textures that need to be modified or updated at runtime, such as those used in dynamic environments or animations.
Usage
To use the WithDynamicUsage
method, first create an instance of Texture3DBuilder
. Then, chain the WithDynamicUsage
method to configure the texture for dynamic usage. Finally, call the Finish
method to build and retrieve the texture.
Example
// Create a new Texture3DBuilder instance
Texture3DBuilder builder = new Texture3DBuilder();
// Configure the texture for dynamic usage
builder.WithDynamicUsage();
// Finalize the texture creation
Texture texture = builder.Finish();
// The texture is now ready to be used and can be updated dynamically