How do I crate a UNavigationInvokerComponent in c++?

I’ve tried:

  • NavInvoker = NewObject(this, TEXT(“NavThingy”));

  • NavInvoker = CreateDefaultSubobject(TEXT(“CompoentFormallyKnownAsNavThingy”));

The compiler craps itself and says:

“unresolved external symbol private: static class UClass *
__cdecl UNavigationInvokerComponent::GetPrivateStaticClass(wchar_t
const *)”

I’ve Downloaded the KiteDemo and looked through all their classes
(25 classes by the way ) and lord knows they didn’t spawn one god ■■■■ UNavigationInvokerComponent.

it looks looks like the FlockManager just calls

UNavigationSystem::RegisterNavigationInvoker(*NewInfo.OwningPawn, 3000.0f, 8000.0f);
to do all to voodoo. I mean can I do that or is unreal gonna crap itself?


After looking through UNavigationInvokerComponent massive 40 lines code it was easy to see I could just call RegisterNavigationInvoker with my Actors as the owing pawn and it workjust fine.

UNavigationSystem::RegisterNavigationInvoker(*this, TileGenerationRadius, TileRemovalRadius);

And then I just added the paramaters to control the tile generation and removal

UPROPERTY(EditAnywhere, BlueprintReadWrite,Category = NotNavigation, meta = (ClampMin = "0.1", UIMin = "0.1"))
		float TileGenerationRadius;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = NotNavigation, meta = (ClampMin = "0.1", UIMin = "0.1"))
		float TileRemovalRadius;

And of course you can’t use the navigation category because reasons.

And it works! For now…

*Edit Word