Game.Zones.ProcessEstimate
Assembly: Assembly-CSharp
Namespace: Game.Zones
Type: struct
Base: Unity.Entities.IBufferElementData
Summary:
A buffer element used with Unity's ECS to store estimated per-cell production and profitability values for a specific processing entity (e.g., a zone processing node). Instances of this struct are intended to be stored in a DynamicBuffer on an entity so multiple per-cell estimates can be associated with that entity.
Fields
-
public float m_ProductionPerCell
Estimated production amount contributed by a single cell for the associated process. -
public float m_BaseProfitabilityPerCell
Base profitability estimate per cell (before modifiers like worker effectiveness or education). -
public float m_WorkerProductionPerCell
Production contribution per cell that is attributable to workers (used when calculating worker-driven production effects). -
public float m_LowEducationWeight
Weighting factor that represents the influence of low-education workers on production/profitability calculations. -
public Unity.Entities.Entity m_ProcessEntity
Reference to the process entity this estimate is associated with (the entity that performs the processing or represents the processing node).
Properties
- (none)
This type is a simple buffer element with public fields and does not expose properties.
Constructors
- (implicit)
public ProcessEstimate()
Structs in C# have an implicit parameterless constructor that initializes numeric fields to 0 and the Entity to Entity.Null. Create instances via object initializer to set values.
Methods
- (none)
This type contains no methods — it is a plain data container intended for use in DynamicBuffer.
Usage Example
// Add a DynamicBuffer<ProcessEstimate> to an entity and populate it.
var processEntity = // some Unity.Entities.Entity that represents a process
var estimatesOwner = // the entity that should own the buffer
var buffer = entityManager.AddBuffer<Game.Zones.ProcessEstimate>(estimatesOwner);
buffer.Add(new Game.Zones.ProcessEstimate {
m_ProductionPerCell = 12.5f,
m_BaseProfitabilityPerCell = 3.2f,
m_WorkerProductionPerCell = 5.0f,
m_LowEducationWeight = 0.8f,
m_ProcessEntity = processEntity
});