Skip to content

Game.Tutorials.TutorialFireTelemetry

Assembly: Game (likely Assembly-CSharp depending on build)
Namespace: Game.Tutorials

Type: struct

Base: IComponentData, IQueryTypeParameter

Summary:
TutorialFireTelemetry is an empty "tag" or marker component used by the game's ECS to mark entities related to the fire tutorial telemetry. It is declared with a fixed layout and Size = 1 so the struct has a non-zero size at runtime (common technique for zero-field marker components to ensure correct memory layout). Implements IComponentData so it can be used as an ECS component and IQueryTypeParameter so it can participate directly in queries/ForEach signatures.


Fields

  • This struct declares no instance fields.
    This type is intentionally empty — it functions as a tag/marker component. The StructLayout attribute with Size = 1 ensures the struct occupies at least one byte.

Properties

  • This struct exposes no properties.
    Being a plain marker component, there are no properties to read or set.

Constructors

  • public TutorialFireTelemetry()
    Structs always have an implicit public parameterless constructor. You can create an instance via new TutorialFireTelemetry() or default(TutorialFireTelemetry) when adding it to an entity.

Methods

  • This struct defines no methods.

Usage Example

using Unity.Entities;
using Game.Tutorials;

// Add the tag component to an entity
var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
Entity e = entityManager.CreateEntity();
entityManager.AddComponent<TutorialFireTelemetry>(e);

// Create an archetype including the tag
var archetype = entityManager.CreateArchetype(typeof(TutorialFireTelemetry), typeof(SomeOtherComponent));
Entity e2 = entityManager.CreateEntity(archetype);

// Query for tagged entities inside a ComponentSystem / SystemBase
// Example for SystemBase:
public partial class FireTelemetrySystem : SystemBase
{
    protected override void OnUpdate()
    {
        // Iterate over entities that have the TutorialFireTelemetry tag
        Entities
            .WithAll<TutorialFireTelemetry>()
            .ForEach((Entity ent /*, in OtherData od */) =>
            {
                // handle telemetry logic for fire tutorial
            })
            .ScheduleParallel();
    }
}

// Or create an EntityQuery directly
EntityQuery query = entityManager.CreateEntityQuery(ComponentType.ReadOnly<TutorialFireTelemetry>());
int count = query.CalculateEntityCount();