MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

"Call to the DotNetNativeWorkaround plug-in failed." even though building with IL2CPP scripting backend

Open jessmi opened this issue 7 years ago • 4 comments

Describe the bug

While running a project built with Unity using the IL2CPP backend and the latest development branch of MRTK I receive this message about a .NET Native plugin.

According to these references it should only be possible to get this message while building with the .NET scripting backend: https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/InputSystem/HandTracking.html#net-native https://github.com/microsoft/MixedRealityToolkit/tree/master/DotNetNativeWorkaround

The message I get:

Call to the DotNetNativeWorkaround plug-in failed. The plug-in is required for correct behavior when using .NET Native compilation UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:LogError(Object) Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityUtilities:GetSpatialCoordinateSystem(IntPtr) Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityUtilities:get_SpatialCoordinateSystem() Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand:UpdateHandData(InteractionSourceState) Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityArticulatedHand:UpdateController(InteractionSourceState) Microsoft.MixedReality.Toolkit.WindowsMixedReality.Input.WindowsMixedRealityDeviceManager:Enable() Microsoft.MixedReality.Toolkit.BaseDataProviderAccessCoreSystem:Enable() Microsoft.MixedReality.Toolkit.Input.MixedRealityInputSystem:Enable() Microsoft.MixedReality.Toolkit.<>c:b__59_0(IMixedRealityService) System.Action1:Invoke(T) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServices(IEnumerable1, Action1) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:ExecuteOnAllServicesInOrder(Action1) Microsoft.MixedReality.Toolkit.MixedRealityToolkit:EnableAllServices() Microsoft.MixedReality.Toolkit.MixedRealityToolkit:OnEnable()

To reproduce

  1. Add the latest NuGet package from the development branch of MRTK to your Unity project (I was using 2.0.0-20190820.1 at the time)
  2. In Unity go to the Mixed Reality Toolkit menu -> Add to scene and configure
  3. Go to Player Settings and make sure you're building with the IL2CPP scripting backend
  4. Build and deploy to the Hololens 2
  5. Run the app and watch the output.

Expected behavior

You don't get the DotNetNativeWorkaround message.

Your Setup (please complete the following information)

  • Unity Version: 2018.4.6f1
  • MRTK Version: NuGet package from mrtk_development branch: 2.0.0-20190820.1

Target Platform (please complete the following information)

  • HoloLens 2

Additional context

I don't think this causes any crashes or major bugs but it does seem incorrect.

I wasn't using a brand new project as the steps to reproduce suggest but I'd expect it to still happen. If we need a repro project I can get one.

jessmi avatar Aug 23 '19 18:08 jessmi

@andreiborodin Is this something we can address as part of the NuGet build? It's currently gated behind https://github.com/microsoft/MixedRealityToolkit-Unity/blob/23a77862420149474e23417187a148a627aff531/Assets/MixedRealityToolkit.Providers/WindowsMixedReality/WindowsMixedRealityUtilities.cs#L18 which I guess is getting resolved?

keveleigh avatar Nov 21 '19 22:11 keveleigh

Hey guys, i use Unity 2018.4.12f1 with Nuget MRTK 2.2 and i got this issue too.

Kent1LG avatar Jan 08 '20 08:01 Kent1LG

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

stale[bot] avatar Sep 20 '20 03:09 stale[bot]

This issue has been closed by an automated process because it is stale. If this is still an issue please add a new comment with more recent details and repro steps.

stale[bot] avatar Oct 24 '20 08:10 stale[bot]