Skip to content

Game.Citizens.CoordinatedMeetingAttendee

Assembly: Assembly-CSharp
Namespace: Game.Citizens

Type: struct

Base: IBufferElementData, ISerializable

Summary: Represents a single attendee reference stored in an ECS DynamicBuffer for coordinated meetings. This buffer element holds an Entity that identifies the citizen (or other game entity) participating in a coordinated meeting. The struct implements ISerializable to participate in the game's save/load serialization pipeline.


Fields

  • public Unity.Entities.Entity m_Attendee Holds the Entity handle for the attendee. Stored in a DynamicBuffer on a meeting or coordinating entity. The Entity may be Entity.Null when not set or if the referenced entity is invalid.

Properties

  • None. (No public properties are defined on this struct.)

Constructors

  • Implicit default constructor (value-type semantics) Structs have an implicit parameterless constructor that initializes m_Attendee to its default value (Entity.Null). You can construct with an object initializer: new CoordinatedMeetingAttendee { m_Attendee = someEntity };

Methods

  • public void Deserialize<TReader>(TReader reader) where TReader : IReader
    Reads an Entity value from the provided reader and stores it in m_Attendee. Used by the game's serialization system when loading saved data to restore the attendee reference.

  • public void Serialize<TWriter>(TWriter writer) where TWriter : IWriter
    Writes the m_Attendee Entity to the provided writer. Used by the game's serialization system when saving state so attendee references are persisted.

Notes: - Serialization depends on the engine's entity remapping/resolution during save/load; raw Entity values may be remapped by the serializer to maintain correct references. - These methods are simple one-field pass-throughs and should be compatible with the Colossal.Serialization pipeline used by the game.

Usage Example

// Add an attendee to a meeting entity's buffer
var buffer = entityManager.GetBuffer<Game.Citizens.CoordinatedMeetingAttendee>(meetingEntity);
buffer.Add(new Game.Citizens.CoordinatedMeetingAttendee { m_Attendee = attendeeEntity });

// The ISerializable methods are called by the game's serializer during save/load.
// No explicit call to Serialize/Deserialize is normally required in user code.