bool CastShadows { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The CastShadows property of the EditorModelAttribute class determines whether the model should cast shadows when displayed in the editor. This property is useful for visualizing how the model will appear in the game environment, particularly in terms of lighting and shadow effects.

Usage

To use the CastShadows property, you need to apply the EditorModelAttribute to a class that represents an entity in the game. You can then set the CastShadows property to true or false depending on whether you want the model to cast shadows in the editor.

Example

[EditorModelAttribute(Model = "models/my_model.vmdl", CastShadows = true)]
public class MyEntity : Entity
{
    // Entity implementation
}