Game.Objects.GeometryFlags
Assembly:
Assembly-CSharp (game assembly for Cities: Skylines 2)
Namespace:
Game.Objects
Type:
enum (with [Flags] attribute)
Base:
System.Enum (underlying type: System.Int32)
Summary:
GeometryFlags is a bitmask enum used by the game's object/geometry system to describe behavior and properties of geometry instances (collision, placement, stamping, zone interactions, rendering/attachment hints, etc.). Each named value represents a single bit (or combination) that systems can test or combine to control how geometry is treated during placement, collision checks, rendering pass decisions, stamping/brush operations, and other object interactions in the world.
Fields
-
None = 0
Represents no flags set. -
Circular = 1
Marks geometry as circular (used for circular placement/footprint and collision tests that assume a radius). -
Overridable = 2
Indicates the geometry can be overridden by other placement operations (e.g., replaced or removed by higher-priority placements). -
Marker = 4
Designates geometry used as a marker/logic-only element (often not rendered or not physically collidable in the same way as regular geometry). -
ExclusiveGround = 8
Denotes geometry that occupies ground exclusivity (prevents other ground objects from using the same footprint). -
DeleteOverridden = 0x10
(decimal 16)
When this geometry is overridden, it should be deleted as part of the override operation. -
Physical = 0x20
(decimal 32)
Indicates the geometry participates in physical collision systems (solid object collisions). -
WalkThrough = 0x40
(decimal 64)
Allows walking through the geometry (does not block pedestrians). -
Standing = 0x80
(decimal 128)
Used to mark geometry where agents can stand (e.g., platforms, benches). -
CircularLeg = 0x100
(decimal 256)
Used for objects whose legs/footprints are circular — affects leg-collision handling. -
OverrideZone = 0x200
(decimal 512)
This geometry can override zoning constraints or is used in zone override logic. -
OccupyZone = 0x400
(decimal 1024)
Geometry that occupies a zone cell (prevents zone placement or consumes zone area). -
CanSubmerge = 0x800
(decimal 2048)
Geometry that is allowed to exist submerged (under water) or participates in submerged placement rules. -
BaseCollision = 0x1000
(decimal 4096)
Indicates base-level collision used for base/footprint collision checks. -
IgnoreSecondaryCollision = 0x2000
(decimal 8192)
Skip secondary collision checks for this geometry (used to optimize or change collision priority). -
OptionalAttach = 0x4000
(decimal 16384)
Geometry that can optionally attach to another object (attachment point metadata). -
Brushable = 0x8000
(decimal 32768)
Allows the geometry to be affected by brush/paint tools (e.g., terrain/decoration brushes). -
Stampable = 0x10000
(decimal 65536)
Marks geometry as compatible with stamping operations (stamp tool interactions). -
LowCollisionPriority = 0x20000
(decimal 131072)
Assigns a lower collision priority so other collisions are preferred/processed first. -
IgnoreBottomCollision = 0x40000
(decimal 262144)
Ignore collision checks against the bottom face/side of the geometry (useful for overhangs/bridges). -
HasBase = 0x80000
(decimal 524288)
Indicates the geometry has a base component (base coverage, foundation). -
HasLot = 0x100000
(decimal 1048576)
Geometry is associated with a lot (affects lot-related logic and placement). -
IgnoreLegCollision = 0x200000
(decimal 2097152)
Ignore collisions related to object "legs" (used for some props/objects with legs).
Properties
- This enum defines constants only; it exposes no properties.
Constructors
- Enums do not declare constructors. Instances are created by assigning one of the enum values or combining them with bitwise operators.
Methods
- The enum itself declares no methods. Use standard enum/bitwise operations and System.Enum methods (e.g., HasFlag, ToString) to work with values.
Usage Example
// Combine flags for a geometry that is physical, has a base, and can be stamped.
GeometryFlags flags = GeometryFlags.Physical | GeometryFlags.HasBase | GeometryFlags.Stampable;
// Check for a flag
bool isPhysical = (flags & GeometryFlags.Physical) == GeometryFlags.Physical;
// or using HasFlag (slower in some runtimes)
bool isStampable = flags.HasFlag(GeometryFlags.Stampable);
// Add a flag
flags |= GeometryFlags.LowCollisionPriority;
// Remove a flag
flags &= ~GeometryFlags.LowCollisionPriority;
// Typical pattern in placement/collision code
if ((flags & GeometryFlags.OccupyZone) != 0)
{
// run zone-occupying logic
}
Notes and tips for modders: - Use bitwise combinations to represent multiple behaviors on a single geometry entry. - Prefer testing with bitwise AND for performance-critical code rather than Enum.HasFlag. - Be cautious when relying on specific flag meanings — some flags are used by internal engine systems (collision, stamping, zone logic), so changing behaviors without full knowledge may produce unintended results. - When extending or storing these flags in serialized data, ensure future compatibility (treat unknown bits as optional/ignored).