Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unreal Engine 5 Preview 1 support #245

Closed
tonetechnician opened this issue Mar 2, 2022 · 4 comments
Closed

Unreal Engine 5 Preview 1 support #245

tonetechnician opened this issue Mar 2, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@tonetechnician
Copy link
Contributor

tonetechnician commented Mar 2, 2022

Hey there!

I've been trying to port a project that relies on UnrealCLR to UE5 Preview 1. I've found a strange compilation issue to occur

D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Private\UnrealCLRFramework.cpp(407): error C2338: Invalid elements count of the [ControllerHand] enumeration
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Private\UnrealCLRFramework.cpp(410): error C2338: Invalid elements count of the [PixelFormat] enumeration
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Private\UnrealCLRFramework.cpp(412): error C2338: Invalid size of the [Bounds] structure

Checking these structs I don't see that there is an issue with the static_assert but it still seems to fail.

In a clean project I can simply comment these lines and the issue goes away and I can compile. But in my current more complex project, when I comment the lines, I run into 100+ compilation errors.

1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(35): error C2653: 'ESplineCoordinateSpace': is not a class or namespace name
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(35): error C2061: syntax error: identifier 'Type'
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(36): error C2653: 'ESplinePointType': is not a class or namespace name
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(36): error C2061: syntax error: identifier 'Type'
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(39): error C2061: syntax error: identifier 'EAudioFaderCurve'
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(41): error C2061: syntax error: identifier 'EViewTargetBlendFunction'
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(45): error C2061: syntax error: identifier 'EHorizTextAligment'
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(50): error C2061: syntax error: identifier 'EVerticalTextAligment'
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(51): error C2061: syntax error: identifier 'EPlaneConstraintAxisSetting'
1>D:\Unreal Projects\Project\Plugins\UnrealCLR\Source\UnrealCLR\Public\UnrealCLRFramework.h(487): error C2143: syntax error: missing ';' before '*'

It seems like it could be an issue with UE5 Preview UHT/UBT as the errors don't really make sense - UE5 Early Access there is no issue. Wondering if anyone else has experienced this, or if there may be a quick fix for now?

Many thanks!

@tonetechnician tonetechnician changed the title issue: get very strange errors when incorporating UnrealCLR into UE5 Preview Strange compilation errors when incorporating UnrealCLR into UE5 Preview Mar 2, 2022
@tonetechnician
Copy link
Contributor Author

tonetechnician commented Mar 2, 2022

Yep, suspicions were correct.. Removing white space at the top of each file seemed to have helped with the strange errors. However, I do see I was wrong and there are some changes to the static_asserts actually, will fix those and make a pull request with the necessary changes for Preview!

@nxrighthere
Copy link
Owner

Those checks are used to determine if changes were made to the engine's structures and enumerations. The managed code should be updated accordingly to such changes with version bump in the C++ code.

@nxrighthere nxrighthere changed the title Strange compilation errors when incorporating UnrealCLR into UE5 Preview Unreal Engine 5 Preview 1 support Mar 2, 2022
@nxrighthere nxrighthere added the enhancement New feature or request label Mar 2, 2022
@tonetechnician
Copy link
Contributor Author

tonetechnician commented Mar 2, 2022

For sure, I was reading source and thought changes didn't happen to these structs, but upon reading closer I saw they had. I think I've resolved the enum changes though, just want to do a bit of testing and then can submit a PR.

Still seemed like a strange error with white space though. I have seemed to have resolved that now.

@tonetechnician
Copy link
Contributor Author

Have made a PR here.

Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants