We are building an app for both Magic Leap 2 and HoloLens 2 using Unity and MRTK. When switching build platforms to UWP a few compile errors from the MRTK-ML2 package appear and prevent us from building and deploying to the HoloLens.
Unity Editor version: 2022.2.0b10
ML2 OS version: 1.0.0
MLSDK version: 1.0.0
MRTK-ML2 version: 1.0.0-v1
MRTK version: 2.8
Repro steps:
- In Unity, switch build platform to Universal Windows Platform or Windows, Mac, Linux.
- Attempt to run an MRTK example scene in the Editor. Note the compile errors prevent the scene from running.
I fixed the compile errors by adding or removing conditional compilation flags and can provide a git patch file with the changes; this fix will only last until we upgrade to a new version of the MRTK-ML2 library.
Error messages from logs (syntax-highlighting is supported via Markdown):
Assets\MRTK-Magic Leap 2\Providers\MagicLeap\Scripts\MagicLeapMRTKController.cs(316,40): error CS0246: The type or namespace name 'InputSubsystem' could not be found (are you missing a using directive or an assembly reference?)
Assets\MRTK-Magic Leap 2\Providers\MagicLeap\Scripts\MagicLeapHandTrackingInputProvider.cs(26,32): error CS0246: The type or namespace name 'MLHandContainer' could not be found (are you missing a using directive or an assembly reference?)
Assets\MRTK-Magic Leap 2\Providers\MagicLeap\Scripts\MagicLeapMRTKController.cs(331,40): error CS0246: The type or namespace name 'InputSubsystem' could not be found (are you missing a using directive or an assembly reference?)