Game.Prefabs.WorkProviderParameterData
Assembly: Game
Namespace: Game.Prefabs
Type: struct
Base: System.ValueType, implements Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter
Summary:
Data-only ECS component used to configure work-provider related notification prefabs, delays and thresholds for a building or provider in Cities: Skylines 2. This struct holds Entity references to notification prefabs for educated and uneducated workers, numeric delay values, notification threshold limits, and the senior employee level value. It is intended to be attached to an Entity to drive how/when the game shows work-related notifications; the interpretation of delays and limits is performed by the systems that read this component.
Fields
-
public Unity.Entities.Entity m_UneducatedNotificationPrefab
Reference to the notification prefab Entity used when an uneducated worker-related notification should be shown. -
public Unity.Entities.Entity m_EducatedNotificationPrefab
Reference to the notification prefab Entity used when an educated worker-related notification should be shown. -
public short m_UneducatedNotificationDelay
Delay value used for uneducated notifications. The unit/semantics (simulation ticks, frames, or seconds) are defined by the systems that consume this component — set according to the expectations of the consumer. -
public short m_EducatedNotificationDelay
Delay value used for educated notifications. As above, the exact unit is defined by the consuming system. -
public float m_UneducatedNotificationLimit
Threshold/limit used by the work-provider logic to determine when to display the uneducated notification. The meaning (e.g., fraction, percentage, absolute count) depends on the consumer implementation; set according to the expected interpretation. -
public float m_EducatedNotificationLimit
Threshold/limit used by the work-provider logic to determine when to display the educated notification. See notes above about interpretation. -
public int m_SeniorEmployeeLevel
Integer value representing the senior employee level relevant to the provider (used by systems to evaluate employee level conditions).
Properties
- This struct exposes no properties. It is a plain IComponentData container with public fields for fast, direct access in DOTS systems.
Constructors
public WorkProviderParameterData()
Struct has the default parameterless constructor (value-type). Values are zero-initialized by default; set fields explicitly before use.
Methods
- This type defines no methods. All behavior is implemented by systems that query and process this component's data.
Usage Example
// Example: assign a WorkProviderParameterData component to an entity
var data = new WorkProviderParameterData
{
m_UneducatedNotificationPrefab = uneducatedPrefabEntity,
m_EducatedNotificationPrefab = educatedPrefabEntity,
m_UneducatedNotificationDelay = 300, // set according to consumer expectations
m_EducatedNotificationDelay = 150,
m_UneducatedNotificationLimit = 0.25f, // interpret as needed by consuming system
m_EducatedNotificationLimit = 0.75f,
m_SeniorEmployeeLevel = 3
};
EntityManager.AddComponentData(targetEntity, data);
{{ Additional notes: - This component is intended for use with Unity DOTS (Entities) systems in the Cities: Skylines 2 modding context. - Ensure the referenced notification prefabs (Entity values) exist and are valid in the same EntityManager/world. - When producing values for delays/limits, consult the consuming system or existing game data to match expected units and ranges. }}