SharpNav.TiledNavMesh.TryGetTileAndPolyByRefUnsafe C# (CSharp) Method

TryGetTileAndPolyByRefUnsafe() public method

Only use this function if it is known that the provided polygon reference is valid.
public TryGetTileAndPolyByRefUnsafe ( NavPolyId reference, NavTile &tile, NavPoly &poly ) : void
reference NavPolyId Polygon reference
tile NavTile Resulting tile
poly SharpNav.Pathfinding.NavPoly Resulting poly
return void
        public void TryGetTileAndPolyByRefUnsafe(NavPolyId reference, out NavTile tile, out NavPoly poly)
        {
            int salt, polyIndex, tileIndex;
            idManager.Decode(ref reference, out polyIndex, out tileIndex, out salt);
            tile = tileList[tileIndex];
            poly = tileList[tileIndex].Polys[polyIndex];
        }