いつからこうだったのかわかりませんが、Unity で UWP アプリを作ると Windows Phone の戻るボタンがフックされて効かなくなるようです
これは審査で不合格になるかもしれないので、Unity の公式ページで報告しておきました
とりあえず一時的な対応としては戻るボタンの動作を上書きすることくらいかもしれません
Unity で出力した UWP プロジェクトの中の App.xaml.cs の OnLaunched を書き換えて、1つイベントハンドラを追加します
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used when the application is launched to open a specific file, to display /// search results, and so forth. /// </summary> /// <param name="args">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs args) { splashScreen = args.SplashScreen; // 追加する SystemNavigationManager.GetForCurrentView().BackRequested += this.OnBackRequested; InitializeUnity(args.Arguments); } /// <summary> /// 戻るボタン押下イベントハンドラ /// </summary> /// <param name="sender">イベント発行者</param> /// <param name="e">イベント引数</param> private void OnBackRequested(object sender, BackRequestedEventArgs e) { Application.Current.Exit(); }
こんな感じに戻るボタンが押されたらアプリ終了・・・厳密にはこれだと元通りではないので、Unity 側のフックをやめないといけないですがとりあえずならこれでリリースはできるかも?
対応後はこんな感じ