Game.Routes.LivePath
Assembly: (not specified in source; typically the game's runtime assembly such as Assembly-CSharp)
Namespace: Game.Routes
Type: struct
Base: IComponentData, IQueryTypeParameter
Summary:
LivePath is an empty marker component (tag) used with Unity's ECS. It is attributed with StructLayout(Size = 1) so the struct occupies one byte instead of being a true zero-sized type — this is often done to avoid issues with APIs or native interop that do not handle zero-sized structs well. Implementing IComponentData makes it usable as a component on entities; implementing IQueryTypeParameter indicates it may be used as a query type parameter in ECS queries.
Fields
This struct declares no instance fields. It exists purely as a tag/marker component and relies on the explicit StructLayout attribute to force a non-zero size.
- (no fields)
LivePath is intentionally empty; the StructLayout attribute with Size = 1 ensures it has a 1-byte footprint.
Properties
- (no properties)
There are no properties defined on this struct.
Constructors
- (implicit parameterless constructor)
LivePath uses the compiler-provided default parameterless constructor. No custom constructors are defined in source.
Methods
- (no methods)
The type provides no methods — it is a plain tag component.
Usage Example
// Add the LivePath tag to an entity
EntityManager.AddComponent<LivePath>(someEntity);
// Query entities that have the LivePath tag in a SystemBase
Entities
.WithAll<LivePath>()
.ForEach((Entity e, in SomeOtherComponent comp) =>
{
// logic for entities that represent live paths
}).Schedule();
Additional notes: - Because LivePath is a tag component, use it to mark entities that participate in route/path handling without storing additional data. - The explicit size (StructLayout(Size = 1)) can help avoid edge cases in native or interop code that expect non-zero-sized components.