Game.InfomodeActive
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: struct
Base: IComponentData, IQueryTypeParameter
Summary:
InfomodeActive is a small ECS component used to mark an entity as being the currently active "infomode" (or a candidate thereof) with an associated priority and index values. It stores three integer fields: a priority (used to select the highest-priority infomode) and two index values that identify the primary and secondary infomode slots. As an IComponentData, it can be attached to entities and used in queries and systems; implementing IQueryTypeParameter allows it to be used in more advanced query/filter scenarios.
Fields
-
public int m_Priority
Holds the priority of this infomode. Higher values typically indicate higher precedence when determining which infomode should be active. -
public int m_Index
Primary index identifying the infomode slot or type. -
public int m_SecondaryIndex
Secondary index for additional identification/details of the infomode (e.g., a sub-type or variation).
Properties
- None.
This struct exposes only public fields and does not define C# properties.
Constructors
public InfomodeActive(int priority, int index, int secondaryIndex)
Initializes a new InfomodeActive with the given priority, index, and secondaryIndex.
Methods
- None.
This type contains no methods beyond its constructor. Behavior is provided by ECS systems that read or write this component.
Usage Example
// Add this component to an entity to mark it as an active infomode.
var infomode = new InfomodeActive(priority: 10, index: 3, secondaryIndex: 0);
EntityManager em = World.DefaultGameObjectInjectionWorld.EntityManager;
em.AddComponentData(someEntity, infomode);
// Or update an existing entity's infomode component in a SystemBase:
Entities
.WithName("SetInfomodePriority")
.ForEach((ref InfomodeActive ia) =>
{
ia.m_Priority = math.max(ia.m_Priority, 20);
}).ScheduleParallel();