Skip to content

Game.Net.Taxiway

Assembly:
Game (assembly name may vary depending on build; often found in the game's game/Assembly-CSharp or Game assembly)

Namespace: Game.Net

Type: struct

Base: IComponentData, IQueryTypeParameter, IEmptySerializable

Summary: A tiny marker/tag ECS component used to mark entities as taxiway-related. The struct is empty (no instance fields) and is explicitly laid out to occupy a single byte (StructLayout Sequential, Size = 1). It implements IComponentData so it can be attached to entities, IQueryTypeParameter so it can be used in entity queries, and IEmptySerializable to participate in Colossal's serialization for empty components.


Fields

  • This struct defines no instance fields.
    The StructLayout(Size = 1) attribute ensures the empty struct is represented with a 1-byte size for serialization and interop purposes.

Properties

  • None. This type does not expose properties.

Constructors

  • No explicit constructors are defined. As a value type (struct) it has the implicit default parameterless constructor, and it is intended to be used as an empty/tag component (e.g., new Taxiway() or via CreateEntity(typeof(Taxiway))).

Methods

  • None. There are no methods on this type.

Usage Example

using Unity.Entities;
using Game.Net;

public partial class TaxiwaySetupSystem : SystemBase
{
    protected override void OnCreate()
    {
        base.OnCreate();

        // Create an entity that has the Taxiway tag component
        Entity taxiwayEntity = EntityManager.CreateEntity(typeof(Taxiway));

        // Alternatively: add the tag to an existing entity
        // EntityManager.AddComponentData(existingEntity, new Taxiway());
    }

    protected override void OnUpdate()
    {
        // Query all entities that are marked as Taxiway
        Entities
            .WithAll<Taxiway>()
            .ForEach((Entity e) =>
            {
                // Process taxiway entities here
            })
            .WithoutBurst() // remove or change depending on usage
            .Run();
    }
}

Notes: - Taxiway is intended as a lightweight marker/component in the Unity DOTS ECS used by the game. Use CreateEntity(typeof(Taxiway)) to create entities that carry the tag, or AddComponentData/AddComponent to attach it to existing entities. - Because it implements IEmptySerializable, the component participates correctly in the game's serialization/streaming systems for empty components.