注意: 古いドキュメント |
---|
Unity 2017.1 以降、このドキュメントは古く、非推奨です。2017–06–30 |
Windows 8.1 ユニバーサルアプリケーションとは、Windows と Windows Phone 向けのアプリを 1 つの Visual Studio 内のプロジェクトで作成する手法です。その中には Windows8.1 用や Windows Phone 用・デスクトップ向け・ラップトップ向け・タブレット用・電話向けも含まれます。それはプラットフォームにおける無駄な動作を収束させダイレクトに結果へ反映されます。
Windows 8.1 ユニバーサルアプリケーションについてさらに情報をお求めであれば、下記のページを参照してください。(http://dev.windows.com/en-us/develop/Building-universal-Windows-apps)
ビルドウィンドウで “Universal 8.1” SDK を選択すると、Unity でユニバーサル Windows ストア/Phone 8.1 向けアプリをビルドすることが可能になります。プロジェクトのビルドに際して Unity は Universal Visual Studio プロジェクトを作成します。これを Windows と Windows Phone デバイスの両方に向けてビルドすることができます。
Windows Phone 8.1 と Windows 8.1 はいまだバイナリ互換ではありません。つまり、ポータブルクラス ライブラリでない限り、単一の DLL を両方のプラットフォームで実行することができません。これは、プラットフォーム固有の API(Windows Phone の SMS API や Windows のマウス API 等)にアクセスできないことを意味します。したがって Unity では二つのバージョンのアセンブリをコンパイルします。
Phone 向けにコンパイルされたアセンブリと、ストア向けにコンパイルされたアセンブリの主な違いは、プリプロセッサ指示文とターゲット SDK の二つです。Windows が Windows .NET Core をターゲットにする一方、Phone は Phone .NET Core をターゲットにします。両者にはわずかな相違点がいくつかありますが、ほぼ同一のものです。
Universal Project フォルダーの構造は以下のようになっています。
UniversalApp1 - (solution directory)
UniversalApp1.Windows - (here goes windows specific files, all Windows DLLs)
-
-
-
UniversalApp1.WindowsPhone - (here goes windows phone specific files, all Windows Phone DLLs)
-
-
-
UniversalApp1.Shared - (here goes shared files)
-
-
-
Universal アプリをビルドすると、同一のプロジェクトから二つのバイナリが作成されます。そのひとつは Windows 用、もうひとつは Windows Phone 用です。どちらの AppX パッケージにも、他のプラットフォームから残された重複ファイルが含まれることはありません。これはプロジェクトの構造のおかげです。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.