TextureArrayBuilder WithCount( int count )

book_4_sparkGenerated
code_blocksInput

Description

The WithCount method is part of the TextureArrayBuilder class in the Sandbox namespace. This method allows you to specify the number of textures that will be included in the texture array being built. It is a fluent method, meaning it returns the TextureArrayBuilder instance, allowing for method chaining.

Usage

To use the WithCount method, call it on an instance of TextureArrayBuilder and pass the desired number of textures as an integer parameter. This method is typically used in a chain of method calls to configure a texture array before finalizing it with the Finish method.

Example

// Example of using WithCount method
TextureArrayBuilder builder = new TextureArrayBuilder();
builder.WithCount(5)
       .WithSize(256, 256)
       .WithFormat(ImageFormat.RGBA8)
       .Finish();