Brush Selected { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Selected property of the BrushList class in the Editor.TerrainEditor namespace represents the currently selected brush from the list of available brushes. This property allows you to get or set the active brush that is being used for terrain editing operations.

Usage

To use the Selected property, you first need to have an instance of the BrushList class. You can then access the Selected property to retrieve the current brush or assign a new brush to it.

Example usage:

BrushList brushList = new BrushList();
brushList.LoadAll(); // Load all available brushes

// Get the currently selected brush
Brush currentBrush = brushList.Selected;

// Set a new brush as the selected brush
Brush newBrush = brushList.Brushes[0]; // Assuming there is at least one brush loaded
brushList.Selected = newBrush;

Example

BrushList brushList = new BrushList();
brushList.LoadAll(); // Load all available brushes

// Get the currently selected brush
Brush currentBrush = brushList.Selected;

// Set a new brush as the selected brush
Brush newBrush = brushList.Brushes[0]; // Assuming there is at least one brush loaded
brushList.Selected = newBrush;