Game.Triggers.ChirpCreationData
Assembly: Game
Namespace: Game.Triggers
Type: struct
Base: System.ValueType
Summary:
Lightweight data container used to describe a "chirp" trigger to be created in the ECS world. It holds a reference to the trigger prefab (entity) and the sender and target entities involved in the chirp. Intended for use by systems that create or enqueue chirp/notification triggers. This struct is a plain value type (blittable) and contains only public Entity fields for direct access.
Fields
-
public Entity m_TriggerPrefab
Holds the Entity that represents the chirp trigger prefab to instantiate or use when creating the chirp. -
public Entity m_Sender
Entity representing the sender of the chirp (e.g., the source game object or AI/player entity). -
public Entity m_Target
Entity representing the target of the chirp (can be Entity.Null if the chirp has no specific target).
Properties
- This struct does not expose any properties. The three public fields are accessed directly.
Constructors
public ChirpCreationData()
No explicit constructors are declared in the source — the default parameterless value-type constructor is used. Create instances using object initializer syntax or default initialization.
Methods
- None. This struct contains no methods; it is a plain data holder.
Usage Example
// Example usage in a system or helper:
// (Assumes you have valid Entity references for prefab, sender and target.)
Entity prefab = /* obtain trigger prefab entity */;
Entity sender = /* obtain sender entity */;
Entity target = /* obtain target entity or Entity.Null */;
var chirp = new ChirpCreationData
{
m_TriggerPrefab = prefab,
m_Sender = sender,
m_Target = target
};
// Pass 'chirp' to a system or helper responsible for instantiating the trigger
// e.g. ChirpSystem.EnqueueChirp(chirp);
// or create the trigger immediately using your project's helper methods.