public static bool GetGroundY(VInt3 pos, out VInt groundY)
    {
        if (!AstarPath.active)
        {
            groundY = pos.y;
            return(false);
        }
        groundY = pos.y;
        PathfindingUtility.acotrName = "null";
        AstarData        astarData           = AstarPath.active.astarData;
        TriangleMeshNode locatedByRasterizer = astarData.GetLocatedByRasterizer(pos);

        if (locatedByRasterizer == null)
        {
            return(false);
        }
        float f = PathfindingUtility.CalculateY_Clamped((Vector3)pos, locatedByRasterizer);

        groundY = (VInt)f;
        return(true);
    }
    public static bool GetGroundY(ActorRoot actor, out VInt groundY)
    {
        if (!AstarPath.active || actor == null)
        {
            groundY = ((actor != null) ? actor.groundY : 0);
            return(false);
        }
        groundY = actor.groundY;
        PathfindingUtility.acotrName = ((actor != null) ? actor.name : string.Empty);
        VInt3            location            = actor.location;
        AstarData        astarData           = AstarPath.active.astarData;
        TriangleMeshNode locatedByRasterizer = astarData.GetLocatedByRasterizer(location);

        if (locatedByRasterizer == null)
        {
            return(false);
        }
        float f = PathfindingUtility.CalculateY_Clamped((Vector3)location, locatedByRasterizer);

        groundY = (VInt)f;
        return(true);
    }
    public static bool GetGroundY(Actor actor, out Int1 groundY)
    {
        if (!AstarPath.active || actor == null)
        {
            groundY = ((actor == null) ? 0 :(int)actor.ActorTransform.position.y);
            return(false);
        }
        groundY = (int)actor.ActorTransform.position.y;
        PathfindingUtility.acotrName = ((actor == null) ? string.Empty : actor.ActorId.ToString());
        Int3             location            = (Int3)actor.ActorTransform.position;
        AstarData        astarData           = AstarPath.active.astarData;
        TriangleMeshNode locatedByRasterizer = astarData.GetLocatedByRasterizer(location);

        if (locatedByRasterizer == null)
        {
            return(false);
        }
        float f = PathfindingUtility.CalculateY_Clamped((Vector3)location, locatedByRasterizer);

        groundY = (Int1)f;
        return(true);
    }