Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Cannot compile UNavigationSystem in 4.20.1

Hey guys, I've tried searching all morning but can't find a way to find the navigation system after going to 4.20 and get it to compile; I used to use

UNavigationSystem * NavigationArea = UNavigationSystem::GetCurrent(GetWorld()), and have since tried the same thing but specifying UNavigationSystemV1, as well as

UNavigationSystemV1 * NavigationArea = FNavigationSystem::GetCurrent(this).
Neither compiles, giving me a LNK2019 error. Btw, I am using

include "Runtime/NavigationSystem/Public/AbstractNavData.h"

include "Runtime/NavigationSystem/Public/NavigationSystem.h"

And yes, I tried using the NavSysPathsUpdate.py just to see if that'd help; it runs for a split second, showed a few changes to make which I followed, and then closed automatically without doing anything. Any ideas?

Product Version: UE 4.20
more ▼

asked Aug 27 '18 at 04:41 PM in C++ Programming

avatar image

1 1 2 1

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

You need to add the "NavigationSystem" module to your Build.cs
And to use FNavigationSystem::GetCurrent you need to specify the type

 #include "NavigationSystem.h"
 UNavigationSystemV1* NavigationArea = FNavigationSystem::GetCurrent<UNavigationSystemV1>(this).

more ▼

answered Aug 28 '18 at 01:55 PM

avatar image

26 3 8

avatar image Re4gNarsil Aug 31 '18 at 01:39 PM

Okay, there we go. That's what I missed; thanks.

avatar image Imagine-Games Jan 05 '19 at 11:44 PM

how do you add the navigation system module to the build.cs ... what would be the lines to type?

avatar image bernhardrieder91 Feb 17 '19 at 09:20 PM
 PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "NavigationSystem" });
(comments are locked)
10|2000 characters needed characters left

Trying this, it still gives me the same error. I've attached a picture that shows the exact error messagealt text

shot-0001.png (19.3 kB)
more ▼

answered Aug 31 '18 at 12:21 PM

avatar image

1 1 2 1

avatar image Superwig Aug 31 '18 at 12:37 PM

And you're sure you added "NavigationSystem" to your Build.cs modules? Because that's the exact linker error you would get if you didn't.

(comments are locked)
10|2000 characters needed characters left

Thanks bernhard, i actually figured it out eventually and also found another thing in my .ini file i had to change the paths as well, which i had but there was 1 elusive path i hadnt seen that was still there referencing the old system....

more ▼

answered Feb 18 '19 at 02:20 AM

avatar image

214 5 10 14

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question