Game.InfoviewBuildingData
Assembly:
Assembly-CSharp (typical Unity game assembly; actual assembly may vary depending on mod / game build)
Namespace: Game.Prefabs
Type:
struct
Base:
IComponentData, IQueryTypeParameter
Summary:
ECS component used to store the BuildingType for an "infoview" prefab or UI-related building representation. This struct is a simple component holding a single BuildingType value so systems and queries can identify or filter entities by building category. The BuildingType enum is defined elsewhere in the codebase and represents the various building categories (residential, commercial, industrial, public service, etc.).
Fields
public BuildingType m_Type
Holds the building category for the entity. As an enum value, this field is blittable and suitable for use in IComponentData. Use this to read or write the building type for infoview-related entities.
Properties
- None.
This struct exposes its data via the public field m_Type. No CLR properties are defined.
Constructors
- Implicit default constructor (parameterless)
As a value type, InfoviewBuildingData has the default parameterless constructor that zero-initializes fields. You can also initialize with an object initializer.
Example explicit init:
var info = new InfoviewBuildingData { m_Type = BuildingType.Residential };
Methods
- None.
No methods are defined on this struct. It implements only the marker interfaces IComponentData and IQueryTypeParameter for use with Unity's ECS.
Usage Example
// Add the component to an entity (EntityManager approach)
var info = new InfoviewBuildingData { m_Type = BuildingType.Commercial };
entityManager.AddComponentData(entity, info);
// Read/modify in a SystemBase using Entities.ForEach
Entities.ForEach((ref InfoviewBuildingData info) =>
{
var type = info.m_Type;
// handle infoview behavior based on type
}).Schedule();