Game.Prefabs.InfoviewMarkerData
Assembly:
Assembly-CSharp (game/mod assembly; actual assembly name may vary)
Namespace:
Game.Prefabs
Type:
struct
Base:
IComponentData, IQueryTypeParameter
Summary:
Component data used by the ECS to mark an entity with an "infoview" marker. It carries a single MarkerType value that identifies the marker's category/icon/behavior. This struct is a plain, unmanaged component suitable for use in Entity queries and systems. MarkerType is defined elsewhere (likely an enum in the codebase) and determines how the marker is interpreted or rendered by systems that consume this component.
Fields
public MarkerType m_Type
The marker type for this infoview marker. Typically an enum value that indicates which marker/icon/category this entity represents. Default is the enum's default value when the component is uninitialized.
Properties
- This component defines no properties. It exposes a single public field.
Constructors
- No explicit constructors are defined. The default parameterless constructor is used. Initialize via object initializer or SetComponentData:
new InfoviewMarkerData { m_Type = MarkerType.SomeValue }
Methods
- This struct defines no methods. It only carries data and implements IComponentData and IQueryTypeParameter to be usable in ECS queries.
Usage Example
// Add the component to a new entity
var em = World.DefaultGameObjectInjectionWorld.EntityManager;
var entity = em.CreateEntity(typeof(Game.Prefabs.InfoviewMarkerData));
em.SetComponentData(entity, new Game.Prefabs.InfoviewMarkerData {
m_Type = MarkerType.Highlight // replace with an actual MarkerType value
});
// Read / process in a SystemBase
public partial class InfoviewMarkerSystem : SystemBase
{
protected override void OnUpdate()
{
Entities
.ForEach((ref Game.Prefabs.InfoviewMarkerData marker) =>
{
// use marker.m_Type to decide rendering/behavior
}).Schedule();
}
}
{{ Notes: Ensure MarkerType enum is referenced/imported. Because this is a plain IComponentData, it can be used in Entity queries, filters, and jobified systems. If the marker semantics depend on other components (position, render data), combine with those in queries. }}