TextureArrayBuilder WithAnonymous( bool isAnonymous )

book_4_sparkGenerated
code_blocksInput

Description

The WithAnonymous method is a member of the TextureArrayBuilder class in the Sandbox namespace. This method allows you to specify whether the texture array being built should be anonymous. An anonymous texture array does not have a specific name associated with it, which can be useful in scenarios where the texture is used temporarily or does not need to be referenced by name.

Usage

To use the WithAnonymous method, call it on an instance of TextureArrayBuilder and pass a boolean value indicating whether the texture array should be anonymous. This method returns the same TextureArrayBuilder instance, allowing for method chaining.

Example

```csharp
// Create a new TextureArrayBuilder instance
TextureArrayBuilder builder = new TextureArrayBuilder();

// Configure the builder to create an anonymous texture array
builder.WithAnonymous(true);

// Continue configuring the builder as needed
builder.WithSize(256, 256)
       .WithFormat(ImageFormat.RGBA8)
       .WithCount(4);

// Finish building the texture array
Texture textureArray = builder.Finish();
```