デコシノニッキ

ホロレンジャーの戦いの記録

HoloLensアプリからEdgeでWebページを表示する

HoloLensアプリから、ブラウザを立ち上げたりアプリを立ち上げることができます。

docs.microsoft.com

MRTKのHandTrackingのExamplesにそのサンプルコードがあります。

以下抜粋

    using System;
    using UnityEngine;

    public class LaunchUri : MonoBehaviour
    {
        /// <summary>
        /// Launch a UWP slate app. In most cases, your experience can continue running while the
        /// launched app renders on top.
        /// </summary>
        /// <param name="uri">Url of the web page or app to launch. See https://docs.microsoft.com/windows/uwp/launch-resume/launch-default-app
        /// for more information about the protocols that can be used when launching apps.</param>
        public void Launch(string uri)
        {
            Debug.Log($"LaunchUri: Launching {uri}");

#if WINDOWS_UWP
            UnityEngine.WSA.Application.InvokeOnUIThread(async () =>
            {
                bool result = await global::Windows.System.Launcher.LaunchUriAsync(new System.Uri(uri));
                if (!result)
                {
                    Debug.LogError("Launching URI failed to launch.");
                }
            }, false);
#else
            Application.OpenURL(uri);
#endif
        }
    }

[デコシノニッキ]は、Amazon.co.jpを宣伝しリンクすることによってサイトが紹介料を獲得できる手段を提供することを目的に設定されたアフィリエイト宣伝プログラムである、Amazonアソシエイト・プログラムの参加者です。」