Game.Prefabs.InfoviewHeatmapData
Assembly:
Assembly-CSharp (typical Unity game assembly where gameplay/mod types are defined)
Namespace:
Game.Prefabs
Type:
struct
Base:
Implements Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter
Summary:
InfoviewHeatmapData is a lightweight ECS component used to carry a HeatmapData value for the infoview/heatmap rendering systems. It tags an entity with the heatmap type or configuration that UI or rendering systems can read to determine which heatmap to show or how to render it. The actual HeatmapData type is defined in Game.Rendering.
Fields
public Game.Rendering.HeatmapData m_Type
Holds the heatmap identifier/configuration. This value is used by rendering or UI systems to determine which heatmap to display or how to interpret the component.
Properties
- This struct defines no properties. It is a plain component data container (public field).
Constructors
public InfoviewHeatmapData()
(implicit default)
No explicit constructors are declared in the source. Use the implicit default constructor or an object initializer to set m_Type.
Methods
- This struct defines no methods. It is a pure data container (IComponentData).
Usage Example
using Unity.Entities;
using Game.Prefabs;
using Game.Rendering;
// Creating an entity and attaching the heatmap component
var em = World.DefaultGameObjectInjectionWorld.EntityManager;
var entity = em.CreateEntity();
em.AddComponentData(entity, new InfoviewHeatmapData {
// Replace the following with an actual HeatmapData value from Game.Rendering
m_Type = /* e.g. HeatmapData.SomeHeatmapValue */
});
// Example SystemBase reading the component
public partial class InfoviewHeatmapSystem : SystemBase
{
protected override void OnUpdate()
{
Entities
.ForEach((ref InfoviewHeatmapData heatmap) =>
{
// Read heatmap.m_Type and react (update UI, request rendering, etc.)
})
.ScheduleParallel();
}
}
Notes: - Because the struct implements IQueryTypeParameter, it is intended for use in queries and to be passed as a query parameter in ECS systems. - HeatmapData is located in Game.Rendering; consult that type's definition for available heatmap identifiers and construction details.