For all the people unfortunate enough to go through this lecture in 4.20.1 version of Unreal

For some reason, the NavMeshBoundsVolume.h is not where it is supposed to be. Instead of being in the AI/Navigation… folder it is in another place altogether, in the NavMesh folder. But it would have been all fine and dandy if the place of the directory was the only problem there is, but if I tried doing anything related to the NavMeshBoundsVolume, whether it is even simply creating a variable of that type then the compilation would give me a horribly lengthy linker error. It is very inconvenient and I have wasted a lot of time trying to fix it, eventually coming to a conclusion of not using NavMeshBoundsVolume.h at all but instead using the GameFramework/Volume.h library, since NavMeshBoundsVolume is a child of it. By finding all the volumes in the world we add a few unneeded things, which I have filtered out by using a Contains function, which finds out whether an FString has a given substring in it or not and returns a bool, which is pretty handy in this situation.

All in all, if someone else has this kind of problem, then I recommend doing it as follows:
image

Hopefully, this way of doing things will not conflict with anything that will be done in the future lectures. Well, if that will be the case I guess that I will have to find a way out again. Anyways, stay hydrated folks!

4 Likes

Okay, I’ve found a way to make the navigation system, including the NavMeshBoundsVolume not to give out massive crashes and compile errors after you’ve upgraded your UE to 4.20.1 while working on this project. You need to your Build.cs file and add the NavigationSystem into the list of included modules like this:
image

Man it took me a long time to figure out this linker error. I hope that someone will find this useful.

13 Likes

Had the same problem,
Thanks to resharper I had no problem adding the header file
but then i got the linker error

after some debugging I looked into the NavMeshBoundsVolume.h header and saw

class NAVIGATIONSYSTEM_API ANavMeshBoundsVolume : public AVolume

The NAVIGATIONSYSTEM_API is the module definition macro
with that I could find out that we have to include a new module

1 Like

Thanks for the fix info
:ok_hand:

Thank you so much for this.
I’ve been going through over and over trying to figure out what was up before finally giving in and seeing if others on here would have a solution.

Get a drink on me :wink:

Thank you guys so much. This has been driving me crazy

Privacy & Terms