How to dynamically place nav link proxies?

I don’t think there is a way to do it purely in Blueprint, as the positions of the links (point or smart) are not exposed.

You would have to create a small C++ helper class to do just that.

  1. Create a C++ Class based on the NavLinkComponent. You’ll need to tick “Show All Classes”. Call it BlueprintableNavLinkComponent.

  2. Open the .h file and find the line with UCLASS(), and add meta = (BlueprintSpawnableComponent) in between the brackets, so it looks like: UCLASS(meta = (BlueprintSpawnableComponent))

  3. Add the following two lines of code under the GENERATED_BODY() line:

    UFUNCTION(BlueprintCallable)

    void SetupLink(FVector Left, FVector Right, ENavLinkDirection::Type Direction);

  4. In the source file (BlueprintableNavLinkComponent.cpp), add the following code:

    void UBlueprintableNavLinkComponent::SetupLink(FVector Left, FVector Right, ENavLinkDirection::Type Direction)
    {
    this->Links[0].Left = Left;
    this->Links[0].Right = Right;
    this->Links[0].Direction = Direction;
    }

For more see this blog post: Navigation Modifiers and Links in UE4 — Vikram Codes

1 Like