int Size { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Size property of the BrushSettings class in the Editor.TerrainEditor namespace specifies the size of the brush used in terrain editing. This property is integral to defining the scale of the brush, affecting how much area is influenced during editing operations.

The Size property is an integer value that can be adjusted within a specified range, allowing for flexible control over the brush dimensions.

Usage

To use the Size property, simply set it to an integer value within the allowed range of 8 to 1024. This range ensures that the brush size is neither too small nor excessively large, providing a balance between precision and coverage.

For example, setting the Size to 50 will configure the brush to affect a moderate area, suitable for detailed terrain modifications.

Example

// Example of setting the Size property
BrushSettings brushSettings = new BrushSettings();
brushSettings.Size = 50; // Sets the brush size to 50

// Ensure the size is within the valid range
if (brushSettings.Size < 8 || brushSettings.Size > 1024)
{
    throw new ArgumentOutOfRangeException("Size must be between 8 and 1024.");
}