Skip to content

Game.Pathfind.ErrorCode

Assembly: Assembly-CSharp
Namespace: Game.Pathfind

Type: enum

Base: System.Enum

Summary:
Enumeration of possible error results produced by the pathfinding subsystem. Used to indicate success or specific failure conditions when creating or resolving path queries (for example during route calculation, start/end access checks, or path generation). The enum values are simple named constants representing distinct error situations.


Fields

  • None
    Represents no error — pathfinding completed without detecting the specific error conditions enumerated here.

  • TooManyEndAccessRequirements
    Indicates that the path query contained more end-access requirements than the pathfinder or the evaluated scenario supports (for example, too many distinct end-access constraints that cannot be satisfied simultaneously).

  • MultipleStartResults
    Indicates that the pathfinding produced multiple conflicting start results where a single start result was expected (for example, ambiguous or duplicate start node/resolution).

Properties

  • This enum does not define properties. Use it as a simple set of named constants.

Constructors

  • Enums do not have user-invokable constructors. Values are the defined named constants above and are assigned integer values by the compiler.

Methods

  • No type-specific methods. Use standard System.Enum / value-type operations (ToString(), comparisons, casting, HasFlag if combined flags were used — not applicable here since this enum represents discrete error codes).

Usage Example

using Game.Pathfind;

public void HandlePathResult(ErrorCode error)
{
    if (error == ErrorCode.None)
    {
        // Pathfinding succeeded — proceed.
    }
    else
    {
        switch (error)
        {
            case ErrorCode.TooManyEndAccessRequirements:
                // Log or handle excessive end-access requirements
                break;
            case ErrorCode.MultipleStartResults:
                // Resolve ambiguous start or retry
                break;
            default:
                // Generic error handling
                break;
        }
    }
}