Game.Tutorials.UITriggerData
Assembly: Assembly-CSharp
Namespace: Game.Tutorials
Type: struct
Base: System.ValueType, Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter
Summary:
UITriggerData is an empty/tag component used by the game's ECS to mark entities that participate in UI-related tutorial triggers. It is decorated with [StructLayout(LayoutKind.Sequential, Size = 1)] so it occupies at least one byte; otherwise it contains no data fields. Implementing IComponentData makes it a Unity ECS component, and IQueryTypeParameter allows it to be used directly in certain query APIs.
Fields
- This struct declares no instance fields.
It is intentionally data-less and used purely as a tag component.
Properties
- This struct declares no properties.
Being a plain tag component, there are no managed properties to read or write.
Constructors
public UITriggerData()
The default parameterless value-type constructor is used (no custom constructors are defined). When added to an entity the value carries no payload.
Methods
- This struct defines no methods.
All behavior is driven by systems that check for the presence of this component on entities.
Usage Example
// Add the tag to an entity
entityManager.AddComponentData(entity, new UITriggerData());
// Querying entities that have the tag (example using Entities.ForEach pattern)
Entities
.WithAll<UITriggerData>()
.ForEach((Entity e) =>
{
// handle UI tutorial trigger for entity 'e'
}).Run();
// Or use SystemAPI / SystemBase APIs in newer ECS packages:
var query = SystemAPI.QueryBuilder().WithAll<UITriggerData>().Build();
// iterate/process matching entities...
Additional notes: - The StructLayout(Size = 1) attribute ensures the struct is non-zero-sized for native interop or layout guarantees. - Use this component when you need a lightweight marker to identify entities relevant to tutorial/UI trigger logic without allocating extra data.