int Size { get; set; }

robot_2Generated
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 an integer value that determines the diameter of the brush in units.

Usage

To adjust the size of the brush, set the Size property to an integer value within the specified range. The valid range for this property is from 8 to 1024, inclusive. This range ensures that the brush size is neither too small nor excessively large, providing a balance between precision and coverage.

Example

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

// 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.");
}