简体   繁体   中英

Using Launcher.LaunchUriAsync for UWP app with IL2CPP scripting backend

I have a Hololens app built using Unity 2019.3. Within the app, I am trying to use a onClick event on a button to open Microsoft Dynamics Remote assist.

I have tried to follow this tutorial. https://docs.microsoft.com/en-us/archive/blogs/appconsult/call-remote-assist-from-your-hololens-app

This tutorial says to use .net as the scripting backend, however Unity 2019.3 only allows IL2CPP as the scripting backend.

Have tried the code from this thread as well but still not working. Execute "LaunchUriAsync" from a click of a HoloLens UI Button

Getting the following errors:

Unity 2019.3 错误

I tried a new project in Unity 2018.4 with scripting backend set to .NET and getting similar errors there as well.

I can't find anything online on how to get Launcher.LaunchUriAsync to work.

This tutorial says to use .net as the scripting backend, however Unity 2019.3 only allows IL2CPP as the scripting backend.

That doc is a bit outdated. We recommend using the latest Unity LTS (Long Term Support) as the best version so that we can avoid some known issues, and the current recommendation is to use Unity 2019.4.20f1 .

And we don't need to set .NET as Scripting Backend anymore since IL2CPP is the best and only choice for now.

Some key steps are:

  1. Create a new project in the latest LTS version Unity
  2. Ensure the target platform is Universal Windows Platform . See File->Build Settings
  3. Build the Unity project (You choose a folder in which Unity generates a Visual Studio solution; Usually, we create a new subfolder of the Unity project named App).
  4. Open the new generated Visual Studio solution file and set the right configuration, build and run.

If you still need help, please paste the C# script clicker.cs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM