UnrealCLR icon indicating copy to clipboard operation
UnrealCLR copied to clipboard

Unreal Engine 5 module compilation error

Open kurushimee opened this issue 2 years ago • 3 comments

From log:

[4/7] Compile Module.UnrealCLR.cpp
C:\Users\jerma\Documents\Projects\spruce_eel\Plugins\UnrealCLR\Source\UnrealCLR\Private\UnrealCLRFramework.cpp(407): error C2338: Invalid elements count of the [ControllerHand] enumeration
C:\Users\jerma\Documents\Projects\spruce_eel\Plugins\UnrealCLR\Source\UnrealCLR\Private\UnrealCLRFramework.cpp(410): error C2338: Invalid elements count of the [PixelFormat] enumeration
C:\Users\jerma\Documents\Projects\spruce_eel\Plugins\UnrealCLR\Source\UnrealCLR\Private\UnrealCLRFramework.cpp(412): error C2338: Invalid size of the [Bounds] structure
C:\Users\jerma\Documents\Projects\spruce_eel\Plugins\UnrealCLR\Source\UnrealCLR\Private\UnrealCLRFramework.cpp(503): warning C4996: 'UObjectBaseUtility::IsPendingKill': IsPendingKill() should no longer be used. Use IsValid(Object), IsValidChecked(Object) or GetValid(Object) instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
C:\Users\jerma\Documents\Projects\spruce_eel\Plugins\UnrealCLR\Source\UnrealCLR\Private\UnrealCLRFramework.cpp(985): warning C4996: 'UEngine::IsSplitScreen': IsSplitScreen was only ever checking if there are more than one local player. Use HasMultipleLocalPlayers instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
LogInit: Warning: Still incompatible or missing module: UnrealCLR
LogCore: Engine exit requested (reason: EngineExit() was called)
LogExit: Preparing to exit.

Seems like it's still incompatible with UE5?

kurushimee avatar May 29 '22 14:05 kurushimee

Well I was able to fix the last two by removing them as they're now deprecated. What about the first three?

kurushimee avatar May 29 '22 14:05 kurushimee

Fixed by:

  • Changing required value from 17 to 18 (changed in UE5 I guess?) at line 407 in Source/Native/Source/UnrealCLR/Private/UnrealCLRFramework.cpp.
  • Removing/commenting out lines 410 and 412 in Source/Native/Source/UnrealCLR/Private/UnrealCLRFramework.cpp. Most likely it's better to correct these instead of getting rid of them, but I don't know how.
  • Removing/commenting out everything about IsPendingKill and IsSplitScreen in UnrealCLR.h and UnrealCLRFramework.h located in Source/Native/Source/UnrealCLR/Public as well as in UnrealCLR.cpp and UnrealCLRFramework.cpp located in Source/Native/Source/UnrealCLR/Private.

kurushimee avatar May 29 '22 16:05 kurushimee

Please, see https://github.com/nxrighthere/UnrealCLR/pull/248.

nxrighthere avatar May 30 '22 16:05 nxrighthere