Skip to content

Game.Prefabs.EventAchievementData

Assembly: Assembly-CSharp.dll (typical game/mod assembly)
Namespace: Game.Prefabs

Type: struct

Base: Unity.Entities.IBufferElementData

Summary:
Represents a single achievement event entry stored in an ECS dynamic buffer. Used to queue/record achievement-related events with an associated frame delay and an option to bypass any internal counting logic. The type is a plain data container (blittable struct) suitable for use with Unity's DOTS ECS buffers.


Fields

  • public AchievementId m_ID
    Identifier for the achievement this event refers to. AchievementId comes from Colossal.PSI.Common and represents the specific achievement instance or definition.

  • public uint m_FrameDelay
    Number of frames to delay processing this achievement event. Useful for scheduling the achievement event to be handled after a given number of frames.

  • public bool m_BypassCounter
    When true, indicates the event should bypass any counter or aggregation logic and be treated as an immediate/special-case trigger.

Properties

  • This struct does not expose any C# properties. It is a plain buffer element (fields only) intended for use in DynamicBuffer.

Constructors

  • public EventAchievementData() (implicit)
    The struct uses the default value-type constructor. You can create instances with object initializers to set fields.

Methods

  • None. This is a POD (plain old data) buffer element type implementing IBufferElementData; it contains no behavior.

Usage Example

// Example: add an achievement event to an entity's buffer
// (assumes 'entityManager' and 'entity' are available, and that the entity has a DynamicBuffer<EventAchievementData>)

AchievementId someAchievementId = /* obtain or construct an AchievementId from Colossal.PSI.Common */;
var buffer = entityManager.GetBuffer<EventAchievementData>(entity);

buffer.Add(new EventAchievementData {
    m_ID = someAchievementId,
    m_FrameDelay = 10u,        // process after 10 frames
    m_BypassCounter = false    // respect normal counters/aggregation
});

Notes: - Because this type implements IBufferElementData it must be used via DynamicBuffer on an entity. - The exact shape and construction of AchievementId is defined in Colossal.PSI.Common; adapt the example to how that type is created/obtained in your code.