Description
The DisplayName
property of the MapClass
class in the Editor
namespace is a public, non-static string property. It provides a human-readable name for the map class, which is typically used in user interfaces to present a more understandable name to users. For example, a map class with a technical name like prop_physics
might have a display name of Physics Prop
.
Usage
To use the DisplayName
property, you can access it directly from an instance of the MapClass
. This property is read-write, allowing you to both retrieve and set the display name of the map class.
Example
// Example of accessing and setting the DisplayName property
// Create an instance of MapClass
MapClass mapClass = new MapClass();
// Set the display name
mapClass.DisplayName = "Physics Prop";
// Retrieve the display name
string displayName = mapClass.DisplayName;
// Output the display name
// Note: Avoid using Console.WriteLine in s&box
// Instead, use in-game UI or logging mechanisms to display information
// Example: Log.Info(displayName);