ProjectBorealis / PBCharacterMovement

HL2-style, classic FPS movement for Unreal Engine implemented in C++
https://www.projectborealis.com/movement
MIT License
1.27k stars 163 forks source link

Fixed build errors for UE5.3 #45

Closed JoeBryan1 closed 1 year ago

JoeBryan1 commented 1 year ago

PR Fix for UE5.3 Build

Errors shown in order they appear

Error 1:

[3/6] Compile [x64] Module.PBCharacterMovement.cpp
C:\Users\****\source\repos\PBCharacterMovement2\HostProject\Plugins\PBCharacterMovement\Source\PBCharacterMovement\Private\Character\PBPlayerCharacter.cpp(5): fatal error C1083: Cannot open include file: 'Launch/Resources/Version.h': No such file or directory

Fixed by removing #include "Launch/Resources/Version.h"

Error 2:

C:\Users\***\source\repos\PBCharacterMovement2\HostProject\Plugins\PBCharacterMovement\Source\PBCharacterMovement\Private\Character\PBPlayerCharacter.cpp(144): error C2027: use of undefined type 'UWorld'
G:\Epic Games\UE_5.3\Engine\Source\Runtime\Engine\Public\Physics\GenericPhysicsInterface.h(12): note: see declaration of 'UWorld'...

Fixed with #include "Engine/World.h"

Error 3:

C:\Users\****\source\repos\PBCharacterMovement2\HostProject\Plugins\PBCharacterMovement\Source\PBCharacterMovement\Private\Character\PBPlayerMovement.cpp(896): error C2065: 'CharPhysFalling': undeclared identifier
C:\Users\****\source\repos\PBCharacterMovement2\HostProject\Plugins\PBCharacterMovement\Source\PBCharacterMovement\Private\Character\PBPlayerMovement.cpp(896): error C3861: 'CSV_SCOPED_TIMING_STAT_EXCLUSIVE': identifier not found

Fixed with #include "ProfilingDebugging/CsvProfiler.h"

mastercoms commented 1 year ago

include "Runtime/Launch/Resources/Version.h"

JoeBryan1 commented 1 year ago

include "Runtime/Launch/Resources/Version.h"

Not sure what you mean by this so I will explain,

I removed it from the cpp file since it was causing the error. Would also fix if I used an exact path to the header file. But since it was also included in the PBPlayerCharacter.h header file I thought that removing it would be fine.

Please tell me if I am wrong.

mastercoms commented 1 year ago

Could you please move the one from the header into the cpp?

JoeBryan1 commented 1 year ago

Done 0a9a0bc75c3bac7fa4d0034aa621125befc3ccc8