Skip to content

Game.Prefabs.ServiceChirpData

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: struct

Base: System.ValueType, Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter

Summary:
Component data used by the ECS to associate a "service chirp" entity/prefab with an account entity. It's a simple, blittable struct that carries a single Entity reference (m_Account). Typically attached to chirp-related entities to know which account/source the chirp belongs to. It can be used in queries and component lookups.


Fields

  • public Unity.Entities.Entity m_Account
    Holds an Entity reference to the account associated with this service chirp. May be Entity.Null if no account is assigned. Used to link the chirp entity back to the originating account/provider for lookups or processing in systems.

Properties

  • This type defines no properties.

Constructors

  • This struct does not define any explicit constructors. It uses the implicit parameterless/value constructor provided by C#.

Methods

  • This type defines no methods.

Usage Example

// Create a chirp entity and attach ServiceChirpData referring to an account entity:
Entity accountEntity = /* obtain or create account entity */;
Entity chirpEntity = entityManager.CreateEntity(typeof(Game.Prefabs.ServiceChirpData));
entityManager.SetComponentData(chirpEntity, new Game.Prefabs.ServiceChirpData { m_Account = accountEntity });

// Querying entities that have ServiceChirpData:
Entities
    .WithAll<Game.Prefabs.ServiceChirpData>()
    .ForEach((Entity e, ref Game.Prefabs.ServiceChirpData sc) =>
    {
        Entity account = sc.m_Account;
        // Process chirp linked to account...
    }).Run();