ultraleap / UnrealPlugin

Ultraleap SDK for the Unreal Engine.
264 stars 68 forks source link

Public Interface of IUltraleapTrackingPlugin::SetSwizzles uses private enum ELeapQuatSwizzleAxisB defined in LeapWrapper.h #106

Closed diekleinekuh closed 2 years ago

diekleinekuh commented 2 years ago

When trying to build LeapMotion 4.03 in a monolithic game I get a compile error:

Module.UltraleapTracking.cpp: ... Plugins\LeapUnreal\Source\UltraleapTrackingCore\Public\IUltraleapTrackingPlugin.h(76): error C2061: syntax error: identifier 'ELeapQuatSwizzleAxisB'

This might be hidden by unity builds at times.

I worked around it by forward declaring the enum. But I guess the enum should rather be moved to UltraleapTrackingData.h.

JimSimons-UH commented 2 years ago

Hi,

Could you provide some details about the build environment you're using?

diekleinekuh commented 2 years ago

Hi:

You can repro this issue by disabling unity builds for the UltraLeapTracking module in BuildConfiguration.xml `<?xml version="1.0" encoding="utf-8" ?>

UltraleapTracking ` Or by adding this to UltraleapTracking.Build.cs: `bUseUnity = false;` I stumbled upon this issue because I was making changes to the UltraLeap plugin and the adaptive unity build Unreal uses pulled out a file from the unity module of the plugin revealing the problem of the missing declarations. I just did a run with unity builds turned off and it revealed more issues: `1> [1/3] OpenXRToLeapWrapper.cpp 1>...\Plugins\LeapUnreal\Source\UltraleapTrackingCore\Private\OpenXRToLeapWrapper.cpp(58): error C2027: use of undefined type 'IXRTrackingSystem'`
JimSimons-UH commented 2 years ago

thanks, this'll allow us to repro the issue.

JimSimons-UH commented 2 years ago

I've pushed another branch with fixes for those issues, these will get merged into main in a subsequent release (see the last two commits).

https://github.com/ultraleap/UnrealPlugin/tree/MonolithicBuildFix

diekleinekuh commented 2 years ago

Awesome. Thanks.

JimSimons-UH commented 2 years ago

this is now merged into main