How to Use Builtin function if it has an Identical public and private implementation?

DtNavMesh has a function getTilesAt(). I am trying to use this in order to access all Tiles of all layers inside of an arbitrary grid location. So that I can check to see if has any Polys and make sure it is valid.

My Issue is that this function has both a private and public implementation that seem identical or at least have identical signatures.

When I go to try and use the function my compiler switches from thinking it is public to private and then yells at me. How do I explicitly call the public version?



The function is overloaded by virtual of the tiles member being a dtMeshTile const** in one case and a dtMeshTile** in the other (lacking the const). Arguably the private one doesn’t need the NAVMESH_API macro)

It’s a bit of a poorly designed API, it’s not great to have overloads cross the private/public boundaries like this.

A quick search found this in RecastNavMesh.cpp:

TArray<const dtMeshTile*> Tiles;
Tiles.AddZeroed(MaxTiles);
const int32 NumTiles = ConstDetourNavMesh->getTilesAt(TileX, TileY, Tiles.GetData(), MaxTiles);

which should be calling the right one. Again, the minor difference in the extra const in the example versus yours.