Game.Buildings.Warehouse
Assembly: Assembly-CSharp (game assembly, exact assembly may vary)
Namespace: Game.Buildings
Type: struct
Base: IComponentData, IQueryTypeParameter, IEmptySerializable
Summary: Warehouse is an empty, tag-like ECS component used to mark entities related to warehouse buildings. The struct is explicitly marked obsolete and has a small fixed size (StructLayout with Size = 1). As an empty/marker component it contains no data and is intended for queries or presence checks in Unity's ECS. It also implements IEmptySerializable which indicates it participates in the game's custom serialization for empty components.
Fields
- This struct declares no instance fields. It is an empty/marker component. {{ The Warehouse type has no backing fields — it is a zero-data tag used for identification in ECS queries. Its StructLayout(Size = 1) ensures a non-zero size for serialization/platform reasons. }}
Properties
- This struct defines no properties. {{ Because Warehouse is an empty value-type tag it exposes no properties; it implements interfaces only to participate in ECS and the game's serialization system. }}
Constructors
- Default value-type constructor (implicit) {{ No explicit constructors are defined. You can create an instance with default(Warehouse) or new Warehouse(), but there is no runtime state. }}
Methods
- No methods are defined on this struct. {{ Being an empty component, behavior is driven by systems that query for the component rather than methods on the component itself. }}
Usage Example
// Add the marker component to an entity
var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
Entity warehouseEntity = entityManager.CreateEntity();
// Mark the entity as a Warehouse (empty tag)
entityManager.AddComponent<Warehouse>(warehouseEntity);
// Query for warehouse entities in a system
public partial class WarehouseSystem : SystemBase
{
protected override void OnUpdate()
{
Entities
.WithAll<Warehouse>()
.ForEach((Entity e) =>
{
// Handle warehouse-tagged entities
}).Schedule();
}
}
{{ Note: Warehouse is marked [Obsolete] in the source. Prefer checking current game/modding documentation for any replacement component or pattern. The IEmptySerializable implementation indicates the game has custom handling for serializing empty components; the StructLayout attribute (Size = 1) ensures a non-zero size for platform/serialization compatibility. }}