Color Color { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Color property of the MeshComponent class represents the tint color applied to the mesh. This property allows you to change the visual appearance of the mesh by applying a color overlay.

Usage

To use the Color property, you can get or set its value using a Color object. This property is virtual and sealed, meaning it can be overridden in derived classes but cannot be further sealed.

Example

// Example of setting the Color property of a MeshComponent
MeshComponent meshComponent = new MeshComponent();
meshComponent.Color = new Color(255, 0, 0); // Sets the mesh color to red

// Example of getting the Color property
Color currentColor = meshComponent.Color;
Console.WriteLine($"Current mesh color: {currentColor}");