Game.Routes.WorkRoute
Assembly:
Game (assembly name not present in source — adjust if different)
Namespace: Game.Routes
Type:
struct
Base:
IComponentData, IQueryTypeParameter, IEmptySerializable
Summary:
WorkRoute is an empty/marker ECS component used to tag entities as representing a "work route" within the game's routing systems. The struct is laid out with StructLayout(LayoutKind.Sequential, Size = 1) to force a non-zero size (1 byte) so it can be safely serialized/managed by the engine and avoids problems associated with zero-sized types. It implements IComponentData for Unity ECS usage and implements IQueryTypeParameter and IEmptySerializable to integrate with the game's query and serialization systems.
Fields
- This type defines no instance fields. It is intentionally empty (marker component) — the StructLayout attribute sets its size to 1 byte at the native layout level to ensure a non-zero footprint for serialization and runtime systems.
Properties
- This type exposes no properties. It is an empty value-type component used only as a tag.
Constructors
public WorkRoute()
As a struct, it has the implicit default constructor (value-initialized). No explicit constructors are declared in source.
Methods
- This type declares no methods. Behavior is provided by other systems that query/operate on entities carrying this marker component.
Usage Example
// Add the marker to an entity (EntityManager context)
var entity = entityManager.CreateEntity(typeof(Game.Routes.WorkRoute));
// Query for entities that are work routes in a system
Entities
.WithAll<Game.Routes.WorkRoute>()
.ForEach((Entity e) =>
{
// handle route entity
})
.Schedule();