rnixik / spider-navigation-plugin

A plugin for Unreal Engine 4 with a custom navigation system suitable for spiders
MIT License
108 stars 37 forks source link

UE5 support #3

Open LuisBurdallo opened 1 year ago

LuisBurdallo commented 1 year ago

It seems there is nothing like this anywhere and I was wondering if this could be updated to make it work in UE5. I am trying to compile it but I get some errors. Any help would be appreciated.

1>[7/11] Compile Module.SpiderNavigation.cpp
1>D:\Unreal Projects\PluginsTest\Plugins\SpiderNavigation\Source\SpiderNavigation\Private\SpiderNavGridBuilder.cpp(159): error C2039: 'bTraceAsyncScene': is not a member of 'FCollisionQueryParams'
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\GameFramework\PlayerController.h(46): note: see declaration of 'FCollisionQueryParams'
1>D:\Unreal Projects\PluginsTest\Plugins\SpiderNavigation\Source\SpiderNavigation\Private\SpiderNavGridBuilder.cpp(234): error C2039: 'bTraceAsyncScene': is not a member of 'FCollisionQueryParams'
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\GameFramework\PlayerController.h(46): note: see declaration of 'FCollisionQueryParams'
1>D:\Unreal Projects\PluginsTest\Plugins\SpiderNavigation\Source\SpiderNavigation\Private\SpiderNavGridBuilder.cpp(440): error C2039: 'bTraceAsyncScene': is not a member of 'FCollisionQueryParams'
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\GameFramework\PlayerController.h(46): note: see declaration of 'FCollisionQueryParams'
1>D:\Unreal Projects\PluginsTest\Plugins\SpiderNavigation\Source\SpiderNavigation\Private\SpiderNavGridBuilder.cpp(480): error C2039: 'bTraceAsyncScene': is not a member of 'FCollisionQueryParams'
1>C:\Program Files\Epic Games\UE_5.1\Engine\Source\Runtime\Engine\Classes\GameFramework\PlayerController.h(46): note: see declaration of 'FCollisionQueryParams'
1>[8/11] Link UnrealEditor-SpiderNavigation.dll cancelled
1>[9/11] Link UnrealEditor-SpiderNavigation.lib cancelled
1>[10/11] Link UnrealEditor-PluginsTest.dll
Joubert123 commented 1 year ago

Simply comment out the lines where those properties are being set. "bTraceAsyncScene" was removed in 4.22.

I got it working in UE5.1

https://forums.unrealengine.com/t/c-transition-guide-for-4-22/124408/8

Hope this helps!

ferlix9o commented 2 months ago

Thank you Joubert123 that helped me fixing those errors.

I am trying to compile for 5.4 and now i have this :

[1 / 4] Compile[x64] Module.SpiderNavigation.cpp

..\Private\SpiderNavGridBuilder.cpp(370) : error C2079 : "OverlapResult" uses undefined struct "FOverlapResult"

..\Private\SpiderNavGridBuilder.cpp(370) : error C2027 : use of undefined type "FOverlapResult"

..\UnrealEngine5.4.4\Engine\Source\Runtime\Engine\Classes\Components\PrimitiveComponent.h(52) : note: see declaration of "FOverlapResult"

any idea on how to fix this error ? Thanks !

EDIT :

this error can be fixed adding

include "Engine/OverlapResult.h"

to SpiderNavGridBuilder.cpp