ultraleap / UnrealPlugin

Ultraleap SDK for the Unreal Engine.
263 stars 67 forks source link

Fix client_config.json not used in packaged builds #140

Open pyrogamer0209 opened 11 months ago

pyrogamer0209 commented 11 months ago

Normally you put the client_config.json next to the LeapC.dll and it is used automatically. This works in the Editor but not for packaged builds.

The provided solution mimics the expected behaviour. The LeapWrapper checks the expected path in the Plugin's Directory and initializes the server_namespace with the file content. If no file is given the default behaviour is used.

We tested it with:

Fritte795 commented 11 months ago

The important changes are in LEAP_CONNECTION* FLeapWrapper::OpenConnection(LeapWrapperCallbackInterface* InCallbackDelegate, bool UseMultiDeviceMode) starting from line 99. The other changes are auto formatting.