Skip to content

Game.Prefabs.InfoviewObjectStatusData

Assembly: Assembly-CSharp (game runtime)
Namespace: Game.Prefabs

Type: struct

Base: IComponentData, IQueryTypeParameter

Summary:
InfoviewObjectStatusData is a small ECS component (value type) used by the game's entity systems to store a status type and an associated 1D range/bounds for objects displayed in infoview overlays. It's a blittable component intended to be attached to entities and used in queries/filters (IQueryTypeParameter) within Unity.Entities-based systems.


Fields

  • public ObjectStatusType m_Type
    Stores the object's status as an enum (defined elsewhere). Typical values represent things like normal, warning, error, or other game-specific object status categories used by the infoview UI.

  • public Bounds1 m_Range
    A Bounds1 structure (from Colossal.Mathematics) representing the object's range/extent along one dimension (min/max). Used for range checks, sorting, or visibility tests in infoview systems.

Properties

  • This type exposes no properties; it uses public fields for data storage.

Constructors

  • public InfoviewObjectStatusData()
    No explicit constructors are defined in the source; it relies on the default value-initialized constructor. You can initialize it with an object initializer to set fields.

Methods

  • This type defines no methods.

Usage Example

// Creating and adding the component to an entity (EntityManager API)
var status = new InfoviewObjectStatusData
{
    m_Type = ObjectStatusType.Warning,
    m_Range = new Bounds1(10f, 20f) // example constructor; actual API may vary
};

entityManager.AddComponentData(entity, status);

// Reading the component inside a SystemBase or ISystem
var statusComponent = EntityManager.GetComponentData<InfoviewObjectStatusData>(entity);
var type = statusComponent.m_Type;
var range = statusComponent.m_Range;

Notes: - Because this implements IComponentData, instances are stored in ECS chunks—keep the size small and blittable. - IQueryTypeParameter suggests this type can be used in query-building scenarios; consult Unity.Entities docs for advanced query usage patterns. - ObjectStatusType and Bounds1 are defined elsewhere in the game's codebase (or in Colossal.Mathematics). Adjust examples to match their actual constructors and enum members.