Skip to content

Game.Prefabs.NetType

Assembly: Assembly-CSharp
Namespace: Game.Prefabs

Type: public enum

Base: System.Enum (underlying type: System.Int32)

Summary:
Represents the broad category of network (net) prefabs used by the game for transportation infrastructure. This enum is used to distinguish between different network types (road, rail, tram, water, subway) when selecting, spawning, or handling behaviour specific to a network prefab.


Fields

  • Road
    Represents standard road prefabs (car traffic, buses, vehicles). Default enum value 0.

  • TrainTrack
    Represents heavy rail / train track prefabs used by intercity and freight trains.

  • TramTrack
    Represents light-rail / tram track prefabs used by trams and streetcars.

  • Waterway
    Represents water-based nets such as canals, ship lanes, and other water transport prefabs.

  • SubwayTrack
    Represents underground metro/subway track prefabs.

Properties

  • None. This enum exposes no properties.

Constructors

  • None. Enums use the default implicit constructors provided by the runtime.

Methods

  • None. No custom methods are defined on this enum.

Usage Example

// Example: choose a prefab behavior based on net type
void HandleNetPrefab(Game.Prefabs.NetType netType)
{
    switch (netType)
    {
        case Game.Prefabs.NetType.Road:
            // handle road-specific setup
            SetupRoadPrefab();
            break;
        case Game.Prefabs.NetType.TrainTrack:
            // handle train track setup
            SetupTrainTrackPrefab();
            break;
        case Game.Prefabs.NetType.TramTrack:
            // handle tram track setup
            SetupTramTrackPrefab();
            break;
        case Game.Prefabs.NetType.Waterway:
            // handle waterway setup
            SetupWaterwayPrefab();
            break;
        case Game.Prefabs.NetType.SubwayTrack:
            // handle subway setup
            SetupSubwayPrefab();
            break;
    }
}

Notes: - The enum values are sequential integers starting at 0 by default (Road = 0, TrainTrack = 1, ...). - Use this enum when filtering or selecting nets, applying type-specific logic, or when defining editor UI that groups prefabs by transport type.