NavigationSystemV1 and how to use invokers on an actor using C++

I am really struggling to find any documentation / forum post or video showing how to implement Invokers on an actor in C++. I have been trying to add a UNavigationInvokerComponent to an actor and just struggling to get anything to compile. I read the excessively slim API reference but feel lost. I also am guessing I need to add “NavigationSystem” to my build.cs but nowhere can I find that documented. I have tried adding it in the constructor with CreateDefautSubobject with no luck, then thought maybe I could set it up OnConstruction… still no luck… Obviously in Blueprints it is as easy as Add Component… but I really rather do this in C++. Can someone share an example for me to learn from or point me in the right direction on documentation which I could learn from. Kindest of regards … one lost learner!

Okay, after adding PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “UMG”, “NavigationSystem” }) to my .Build.cs I can now add programatically the InvokerComponent like any other component to my actor.

I never found any documentation to say that adding this to your build.cs is mandatory and only by finding someone else in the same position did a I get a pointer in the right direction. Hours wasted for something that should be in the API as Nota Bene at the top of the page.

Quick tip I learned the hard way a while back. Check the documentation of the needed file and see the part marked “Module”. That is what is needed for the file and it’s systems to compile

1 Like

Thank you… well this makes things a lot easier. Assumed this was already all built in and all I needed was the header file because it was built from that ‘included’ module… again… thank you.