Game.Prefabs.CityServiceInfo
Assembly:
Game (assembly where CityServiceInfo is defined)
Namespace:
Game.Prefabs
Type:
class
Base:
System.Object
Summary:
Serializable data container used to associate a Color with a city service. Typically used in prefabs or configuration data to define visual/color information for a particular in-game service (e.g., police, fire, garbage). Marked with [Serializable] so instances can be stored/loaded by Unity and shown in the inspector.
Fields
-
public UnityEngine.Color m_Color
Color assigned to the service. Used for visualization in UI or debug overlays. As a UnityEngine.Color, it includes RGBA components. -
public Game.City.CityService m_Service
Reference/identifier of the city service. CityService is defined in the Game.City namespace and represents the specific service this entry applies to (for example, police, fire, medical, etc.). This field ties the color value to a particular service type.
Properties
- This type declares no properties.
Constructors
public CityServiceInfo()
Default parameterless constructor (compiler-provided). Creates a new instance with default field values (m_Color defaults to Color.clear/black depending on Unity version, m_Service to its default value).
Methods
- This type declares no methods.
Usage Example
// Create and populate a CityServiceInfo at runtime
var policeInfo = new Game.Prefabs.CityServiceInfo
{
m_Service = Game.City.CityService.Police, // example enum/member
m_Color = new UnityEngine.Color(0.0f, 0.2f, 1.0f, 1.0f) // blue tint
};
// Assign to a prefab or config list
var serviceList = new List<Game.Prefabs.CityServiceInfo>();
serviceList.Add(policeInfo);
// If used in a MonoBehaviour or ScriptableObject, the [Serializable] attribute
// allows these instances to be serialized and edited in the Unity inspector.