Skip to content

Game.Prefabs.ZoneBuiltDataValue

Assembly: Assembly-CSharp.dll
Namespace: Game.Prefabs

Type: struct

Base: System.ValueType

Summary:
Small value type used to store aggregated data about built zones or prefabs: the number of instances (m_Count) and the total number of grid squares they occupy (m_Squares). Typically used by prefab/zone bookkeeping or statistics code to accumulate counts and area. The fields are public and there are no validation checks performed by this struct.


Fields

  • public int m_Squares
    Number of grid squares occupied by the built zone/prefab. Units are in game grid squares.

  • public int m_Count
    Number of built instances counted.

Properties

  • This type does not declare any properties.

Constructors

  • public ZoneBuiltDataValue(int count, int squares)
    Initializes a new ZoneBuiltDataValue with the specified instance count and square count. Parameter order is (count, squares).

Methods

  • This type does not declare any methods.

Usage Example

// Create a value representing 2 instances occupying 10 squares in total.
var data = new Game.Prefabs.ZoneBuiltDataValue(2, 10);

// Read fields directly
int instances = data.m_Count;   // 2
int squares = data.m_Squares;   // 10

// Note: as a struct this is a value type — modifying a copy does not change the original.
var copy = data;
copy.m_Count = 3; // data.m_Count remains 2