The Selected
property of the BrushList
class 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 in the terrain editing process.
The Selected
property of the BrushList
class 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 in the terrain editing process.
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.
Ensure that the brush you are assigning is part of the Brushes
list to avoid inconsistencies.
// Assuming you have an instance of BrushList BrushList brushList = new BrushList(); // Load all available brushes brushList.LoadAll(); // Access the currently selected brush Brush currentBrush = brushList.Selected; // Set a new brush as the selected brush if (brushList.Brushes.Count > 0) { brushList.Selected = brushList.Brushes[0]; }