Skip to content

Game.Prefabs.NetEdgeMatchType

Assembly:
Assembly-CSharp.dll
{{ This enum is defined in the game's main assembly (commonly Assembly-CSharp.dll for Cities: Skylines 2). }}

Namespace: Game.Prefabs

Type:
public enum

Base:
System.Enum
{{ Underlying integral type is int by default (System.Int32) unless otherwise specified. }}

Summary:
{{ NetEdgeMatchType defines options that control how two network edges (for example road/rail segments or prefab edge connections) are compared or matched when the game or a mod attempts to align, snap or validate connections between edges. It expresses whether matching requires both edges to meet criteria, any one of them, or an exclusive condition. }}


Fields

  • Both
    {{ Requires that both edges satisfy the match criteria. Use when a match should only be considered valid if both sides conform (e.g., both have the same type or attributes). }}

  • Any
    {{ A match is valid if at least one of the edges satisfies the criteria. Useful for permissive matching where one-sided compatibility is sufficient. }}

  • Exclusive
    {{ Indicates exclusive matching — typically used when a match should occur only if exactly one side meets the criteria (not both). Can be used to express mutually exclusive connection rules. }}

Properties

  • None.
    {{ This enum does not define properties. }}

Constructors

  • None (enum has implicit constructors).
    {{ Enums do not expose custom constructors; each named value is a constant of the underlying integral type. }}

Methods

  • None declared on the enum.
    {{ Standard System.Enum methods (ToString, HasFlag, etc.) are available from the base type but no custom methods are declared here. }}

Usage Example

using Game.Prefabs;

public void HandleEdgeMatch(NetEdgeMatchType matchType)
{
    switch (matchType)
    {
        case NetEdgeMatchType.Both:
            // require both edges to match
            break;
        case NetEdgeMatchType.Any:
            // allow either edge to satisfy the rule
            break;
        case NetEdgeMatchType.Exclusive:
            // allow only one edge to satisfy the rule
            break;
    }
}