Skip to content

Game.Objects.Stopped

Assembly:
Assembly-CSharp (typical for Cities: Skylines 2 game code / mods; file located at Game\Objects\Stopped.cs)

Namespace: Game.Objects

Type:
struct Stopped

Base:
Implements: - Unity.Entities.IComponentData
- Unity.Entities.IQueryTypeParameter
- Colossal.Serialization.Entities.IEmptySerializable

Summary:
Stopped is a tiny marker component (empty struct) used within the ECS to tag an entity as "stopped". It contains no payload — only identity. The struct is laid out with a fixed Size = 1 byte to ensure a non-zero size for serialization and engine/internal data structures. It also implements IQueryTypeParameter so it can be used in queries and IEmptySerializable to participate in the game's custom serialization system.


Fields

This struct defines no instance fields; it is an empty marker type.

Properties

This struct has no properties.

Constructors

  • public Stopped()
    Implicit default constructor. The struct is empty and does not initialize any data.

Methods

This struct defines no methods. Its semantics are entirely as a marker/type tag for ECS queries and serialization.

Notes: - Attribute applied: [StructLayout(LayoutKind.Sequential, Size = 1)] — ensures the type occupies at least 1 byte. - Implements IComponentData so it can be attached to entities as a component. - Implements IQueryTypeParameter to allow usage in queries (e.g., Entities.WithAll()). - Implements IEmptySerializable to enable the game's empty-struct serialization path.

Usage Example

// Tag an entity as stopped
entityManager.AddComponent<Stopped>(entity);

// Query for stopped entities
Entities.WithAll<Stopped>().ForEach((Entity e) =>
{
    // process stopped entities
}).Run();