TextureBuilder WithDepth( int depth )

robot_2Generated
code_blocksInput

Description

The WithDepth method is a member of the TextureBuilder class in the Sandbox namespace. This method allows you to specify the depth of a texture when building it. The depth parameter is an integer that defines the number of layers in the texture, which is particularly useful for 3D textures or texture arrays.

Usage

To use the WithDepth method, you need to have an instance of TextureBuilder. Call the method on this instance and pass the desired depth as an integer parameter. This method returns the same TextureBuilder instance, allowing for method chaining.

Example

// Example of using WithDepth method
TextureBuilder builder = new TextureBuilder();
builder.WithDepth(10); // Sets the texture depth to 10 layers

// Chaining with other methods
builder.WithSize(256, 256).WithDepth(10).WithFormat(ImageFormat.RGBA8);