Game.Buildings.WelfareOffice
Assembly: Assembly-CSharp
Namespace: Game.Buildings
Type: struct
Base: IComponentData, IQueryTypeParameter, IEmptySerializable
Summary: WelfareOffice is an empty/tag ECS component used to identify entities that represent a "welfare office" building in the game's entity-component system. The struct is explicitly given a layout/size of 1 byte through the StructLayout attribute to ensure it is not a zero-sized type (which can be important for some serialization or interop scenarios). Being empty, it carries no data—its presence/absence on an entity is used for queries, filtering, or behavior selection.
Fields
- This type declares no instance fields.
WelfareOffice is an empty/tag component; its existence on an entity is the meaningful information.
Properties
- This type declares no properties.
Constructors
public WelfareOffice()
There is no custom constructor defined. As a value type (struct) it has the default parameterless constructor produced by the runtime. No initialization is required because the component contains no data.
Methods
- This type declares no methods.
It implements IQueryTypeParameter and IEmptySerializable to integrate with the game's ECS query/serialization systems, but provides no runtime behavior itself.
Usage Example
// Add the tag component to an entity
var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
Entity someBuildingEntity = /* obtain/create entity */;
entityManager.AddComponentData(someBuildingEntity, new WelfareOffice());
// Query for all welfare office entities in a system
Entities.WithAll<WelfareOffice>().ForEach((Entity e) =>
{
// operate on welfare office entities
}).Schedule();