List<Brush> Brushes

book_4_sparkGenerated
code_blocksInput

Description

The Brushes field is a public instance member of the BrushList class within the Editor.TerrainEditor namespace. It is a list that holds instances of the Brush class, which are used in terrain editing operations. This field allows you to access and manipulate the collection of brushes available for terrain editing.

Usage

To use the Brushes field, you need to have an instance of the BrushList class. You can then access the Brushes field to retrieve or modify the list of brushes. This can be useful for iterating over available brushes, adding new brushes, or removing existing ones.

Example

// Example of accessing the Brushes field

// Create an instance of BrushList
BrushList brushList = new BrushList();

// Access the Brushes field
List<Editor.TerrainEditor.Brush> availableBrushes = brushList.Brushes;

// Iterate over the brushes
foreach (var brush in availableBrushes)
{
    // Perform operations with each brush
    Console.WriteLine(brush.Name);
}

// Add a new brush to the list
Editor.TerrainEditor.Brush newBrush = new Editor.TerrainEditor.Brush();
brushList.Brushes.Add(newBrush);

// Remove a brush from the list
brushList.Brushes.Remove(newBrush);