Game.Pathfind.PathfindFlags
Assembly: Assembly-CSharp (typical game runtime assembly)
Namespace: Game.Pathfind
Type: enum (flags)
Base: System.Enum (underlying type: System.UInt16)
Summary:
Bitmask flags used to control pathfinding behavior. Each value represents an option that can be combined with others (the enum is marked with [Flags]). These flags influence routing logic such as direction enforcement, heuristics usage, parking handling, multi-origin/destination support, and whether to ignore certain access/path checks. Use bitwise operators or Enum.HasFlag to compose and inspect them.
Fields
-
Stable = 1
Indicates a stable path (used to mark or request a path that should remain valid/stable). Typically used to mark paths that should not be changed or re-evaluated frequently. -
IgnoreFlow = 2
Ignore dynamic flow/traffic information when calculating the route. Use when flow considerations (e.g., congestion) should be omitted from cost calculations. -
ForceForward = 4
Force pathfinding to prefer/require forward movement along a defined direction (useful for one-way enforcement or directional constraints). -
ForceBackward = 8
Force pathfinding to prefer/require backward movement (opposite of ForceForward). Useful for special cases where reverse movement is necessary. -
NoHeuristics = 0x10
Disable heuristics (e.g., A* heuristic) during pathfinding, making the search more exhaustive/accurate at the cost of performance. -
ParkingReset = 0x20
Reset or ignore cached parking-related state when calculating the path. Often used when parking data has changed and needs re-evaluation. -
Simplified = 0x40
Use a simplified/cheaper version of the pathfinding algorithm. Good for less critical calculations where performance is prioritized over accuracy. -
MultipleOrigins = 0x80
Allow multiple origin nodes/positions for a single pathfinding query (multi-source pathfinding). -
MultipleDestinations = 0x100
Allow multiple destination nodes/positions for a single pathfinding query (multi-target pathfinding). -
IgnoreExtraStartAccessRequirements = 0x200
Ignore additional access requirements/checks at the path start (useful when start access restrictions should be bypassed). -
IgnoreExtraEndAccessRequirements = 0x400
Ignore additional access requirements/checks at the path end. -
IgnorePath = 0x800
Ignore any existing cached path and treat the query as if no prior path exists (forces recomputation). -
SkipPathfind = 0x1000
Skip the pathfinding process entirely for this request (used for special-case logic where no path is desired).
Properties
- None
This enum type does not declare properties. It is a plain flags enum; behavior is inspected via bitwise operations or Enum.HasFlag.
Constructors
public PathfindFlags()
Not applicable — enums do not define instance constructors. Values are created/combined using enum literals, bitwise operators, or by casting from the underlying integer type (ushort).
Methods
- None (no custom methods declared)
No instance or static helper methods are declared on this enum. Use standard enum operations: - bitwise OR (|) to combine flags
- bitwise AND (&) or Enum.HasFlag to test flags
- casting to/from the underlying ushort when interacting with low-level APIs
Usage Example
// Combine flags
PathfindFlags flags = PathfindFlags.Stable | PathfindFlags.ForceForward | PathfindFlags.NoHeuristics;
// Test flags
bool disabledHeuristics = (flags & PathfindFlags.NoHeuristics) != 0;
// or
bool skip = flags.HasFlag(PathfindFlags.SkipPathfind);
// Remove a flag
flags &= ~PathfindFlags.ForceForward;
// Cast to underlying type (ushort) for low-level APIs
ushort raw = (ushort)flags;
// Create flags from raw value
PathfindFlags fromRaw = (PathfindFlags)raw;