I can't add a way when the ai reaches the nav link c++

There’s a delegate to bind for this

void UNavLink_NPC::OnRegister()
{
    Super::OnRegister();
    SetMoveReachedLink(this, &UNavLink_NPC::HandleSmartLinkReached);
}

void UNavLink_NPC::HandleSmartLinkReached(UNavLinkCustomComponent* ThisComp, UObject* PathComp, const FVector& DestPoint)
{
    //...
}