Description
The EntityClasses
property provides a read-only list of all entity classes that are exposed to the tools within the s&box environment. This list is essential for developers who are creating or modifying tools that interact with game entities, as it allows them to access and utilize the available entity classes.
Usage
To access the EntityClasses
property, you can directly reference it from the Editor.GameData
class since it is a static property. This property is particularly useful when you need to iterate over all available entity classes to perform operations such as listing them in a UI or processing them for a specific tool functionality.
Example
// Example of accessing the EntityClasses property
var entityClasses = Editor.GameData.EntityClasses;
// Iterate over the entity classes and print their names
foreach (var entityClass in entityClasses)
{
// Assuming MapClass has a Name property
Console.WriteLine(entityClass.Name);
}