Upload
akira-onishi
View
3.895
Download
1
Embed Size (px)
DESCRIPTION
2013/8/23 に CEDEC 2013 で講演した Unity on Windows 8 のスライドです。Windows ストア アプリ、Windows Phone 8 のビルドに対応した Unity 4.2、このセッションでは、ライブコーディングを交えて、次の内容をご紹介しました。 ・Unity のコンテンツを Windows ストア アプリにする方法 ・Unity プラグインでWindows ランタイムの機能を利用する方法 ・Unity プラグインを通じて、BaaS である Windows Azure モバイルサービスへ接続する方法 ・出来上がったアプリをWindows ストアへ申請する方法 ・Microsoft の開発者支援 セッションレポート: Unity 4.2でBaaSを使って簡単にストアアプリを作るには~CEDEC 2013「Unity on Windows 8」レポート (@IT Smart & Social) http://www.atmarkit.co.jp/ait/articles/1308/28/news022.html 関連する情報は、 http://bit.ly/UnityOnWindows8 に更新していきます。
Citation preview
デモを中心としたセッションです。
Devices
Services
Windows in
the cloud
http / https
• HTML 5 Web アプリ• デスクトップアプリ• Windowsストアアプリ
• ASP.NET MVC, ASP.NET Web API
• ASP.NET SignalR
• Windows Azure Mobile Services
REST / JSON
これからのアプリ開発の選択肢
生まれ変わった Windowsタッチが最優先
新たな開発モデル
複数のフォーム ファクター
Windows ストア
Windows 8 プラットフォーム
Orcs Must Survive
Drift Mania Championship 2
Pettson's Inventions
Gunpowder
Rumpelstiltskin 3D
Snow White Prequel
Razor Salvation
Siegecraft
Qbism
Hungry MonstR
Fling Theory
Experiment HD など
Big Buck Hunter
Unity
コンテンツ
作成
Windows
ストアアプリ用
にビルド
アプリの仕上げ
Windows
固有の機能の
実装
パッケージ
作成
Windows
ストアへ申請
Remote Tools for Visual Studio 2012
http://go.microsoft.com/fwlink/?LinkId=255953
Assets¥Plugins Assets¥Plugins¥Metro
http://bit.ly/WAMobileService
Unity から Windows Azure Mobile
Services へアクセスするプラグイン
Windows 8, Windows Phone 8 対応iOS, Android 対応予定
Plugins Bitrave.Azure.dll
Newtonsoft.Json.dll (net20)
RestSharp.dll (net35-client)
Metro Bitrave.Azure.dll
RestSharp.dll
Newtonsoft.Json.dll (net45)
Unity 4.2 の制約にご注意
http://bit.ly/unity42w8
JavaScript (Unity Script) や Boo はC# コードに変更しましょう
Windows App Certification Kit
http://msdn.microsoft.com/en-us/windows/apps/jj572486.aspx
Windows ストア、開発者登録
Microsoft アカウントを作成法人の場合、共用できるアカウントを作成
Windows ストアにアクセスするコンピュータを「信頼済み PC」に登録
クレジットカードを準備 (少額決済の確認が必須)
https://appdev.microsoft.com/StorePortals/ へアクセス
法人登録の場合は、GeoTrust (Symantec) から届くメールをご確認
http://bit.ly/WSAppReg
Visual Studio with MSDN Subscription~ Visual Studio を入手するなら MSDNサブスクリプション付きで
技術サポート付き
最新バージョン、および過去バージョンを入手
Visual Studio 2013 Windows 8.1
Windows Server 2012 R2
SQL Server 2014
Team Foundation Server
Windows XP Visual Basic 6.0 MS-DOS 6.0 … など
DreamSpark とは?学生や教員のみなさまの技術的な学習や教育、研究をサポートする年間制のメンバーシッププログラムです。
www.dreamspark.com
DreamSpark のメリット
① マイクロソフトの開発ツールやサーバー製品をいつでもダウンロードできます
② 学生個人は 0円で、教育機関は 10,500円からご利用できます
③ ダウンロードした製品は永続的に利用できます
Assets¥Plugins Assets¥Plugins¥Metro
プラグインの作成
このファイルに WinRT API を使った機能を実装
WinRT 用クラスライブラリで作成したファイルのショートカットを作成1. プロジェクトを右クリック→追加→既存の項目2. UnityWinRTPluginのLiveTile.csを選択3. ダイアログの追加ボタンで
“リンクとして追加”を選択これにより、同じファイルを利用
プラグインの使い道
Windows ストアアプリ側で使用(ストアアプリプロジェクトに追加)
Build した後に実行されるコードWindows ランタイム (.NET 4.5レベル)
Unityプロジェクト側 で使用(Unity Editor 内は .NET 2.0 レベル)
条件コンパイルを利用し、Unity Editor 内で動作しないコードは含めないこと
それぞれのライブラリーを
同じアセンブリ名、同じ名前空間にすること
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;#if NETFX_COREusing Windows.UI.Notifications;#endif
namespace UnityWinRTPlugin{
public class LiveTile{
public bool UpdateTile(string title, string text){
#if NETFX_COREvar tile = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquareText02);var elements = tile.GetElementsByTagName("text");elements[0].AppendChild(tile.CreateTextNode(title));elements[1].AppendChild(tile.CreateTextNode(text));
TileUpdateManager.CreateTileUpdaterForApplication().Update(new TileNotification(tile));#endif
return true;}
}}
Pluginsフォルダに
Metroという名前でサブフォルダー作成
DLLファイルをコピー
“External Script Editor”を"Browse…" からエクスプローラーを呼び出し、devenv.exe を指定して、“Visual Studio 2012”に設定
using UnityWinRTPlugin;
LiveTile tile = new LiveTile();
tile.UpdateTile(“Fire!”,DateTime.Now.ToShortTimeString());
http://msdn.microsoft.com/ja-jp/library/windows/apps/br230836.aspx
Windows アプリ認定キット (WACK)
Windows ストアにアプリを提出する前の事前テスト用ツール
パッケージの作成時に実行
あるいは、手動で呼び出し (windows app で検索)
© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot
guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.