unity on windows 8.1

38
Unity on Windows 8.1 http://aka.ms/Unity4win

Upload: akira-onishi

Post on 21-Nov-2014

3.256 views

Category:

Technology


4 download

DESCRIPTION

Unity 4.3 と Windows 8.1を利用して、Windows ストアアプリを開発する流れをご紹介します。

TRANSCRIPT

Page 1: Unity on Windows 8.1

Unity on Windows 8.1

http://aka.ms/Unity4win

Page 2: Unity on Windows 8.1

2

Page 3: Unity on Windows 8.1

Windows 81 億以上のライセンス

ストアに 10 万アプリ以上2.5 億以上のダウンロード

200 ヶ国以上で提供

Windows 8.1Windows 8 と RT向けに無償提供

2013 年 10 月 18日リリースより多くのデバイス サポート

Page 4: Unity on Windows 8.1
Page 5: Unity on Windows 8.1

5

Windows 8.1 プラットフォーム

Page 6: Unity on Windows 8.1

6

Page 7: Unity on Windows 8.1

7

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

Page 8: Unity on Windows 8.1

8

Page 9: Unity on Windows 8.1

9

Page 10: Unity on Windows 8.1

10

Unity

コンテンツ

作成

Windows

ストアアプリ用

にビルド

アプリの仕上げ

Windows

固有の機能の

実装

パッケージ

作成

Windows

ストアへ申請

Page 11: Unity on Windows 8.1

11

Page 12: Unity on Windows 8.1

12

Remote Tools for Visual Studio 2013 (ARM)http://go.microsoft.com/?linkid=9832099

Page 13: Unity on Windows 8.1

13

Page 14: Unity on Windows 8.1

14

• HTML タグ、コントロールによる簡単な配置• pubCenter による海外の税金処理など• インプレッション課金http://adsinapps.microsoft.com/ja/sdk

Page 15: Unity on Windows 8.1

15

Assets¥Plugins Assets¥Plugins¥Metro

Page 16: Unity on Windows 8.1

16

開発者登録

マイクロソフト アカウントを使用

年間登録費用

個人 : 1,847 円

法人 : 9,800 円

クレジットカードでの支払い

https://appdev.microsoft.com/storePortals/

Page 17: Unity on Windows 8.1

17

Page 19: Unity on Windows 8.1

19

http://bit.ly/UnityOnWindows8

http://www.bitrave.com/azure-mobile-services-for-unity-3d/

http://scan.xamarin.com/

http://aka.ms/8store

http://msdn.microsoft.com/ja-jp/hh455217.aspx

http://www.microsoft.com/ja-jp/mic/bizspark/default.aspx

Page 20: Unity on Windows 8.1
Page 21: Unity on Windows 8.1
Page 23: Unity on Windows 8.1

23

Unity から Windows Azure Mobile Services へアクセスするプラグイン

Windows 8, Windows Phone 8 対応iOS, Android 対応予定

Plugins Bitrave.Azure.dllNewtonsoft.Json.dll (net20)RestSharp.dll (net35-client)

Metro Bitrave.Azure.dllRestSharp.dllNewtonsoft.Json.dll (net45)

Page 24: Unity on Windows 8.1

24

Page 25: Unity on Windows 8.1

25

/*CriAtomSouceを取得*/

CriAtomSource atom_src = selectedGameObject.GetComponent<CriAtomSource>();/* 再生開始*/

atom_src.Play();

Page 26: Unity on Windows 8.1

26

アプリ パッケージの作成

Windows ストア アプリの展開

アプリ パッケージの登録

Windows ストアでの公開

Page 27: Unity on Windows 8.1

27

Page 28: Unity on Windows 8.1

28

Windows App Certification Kithttp://msdn.microsoft.com/en-us/windows/apps/bg127575

Page 29: Unity on Windows 8.1

Assets¥Plugins Assets¥Plugins¥Metro

Page 30: Unity on Windows 8.1
Page 31: Unity on Windows 8.1

プラグインの作成

このファイルに WinRT API を使った機能を実装

WinRT 用クラスライブラリで作成したファイルのショートカットを作成1. プロジェクトを右クリック→追加→既存の項目2. UnityWinRTPluginのLiveTile.csを選択3. ダイアログの追加ボタンで

“リンクとして追加”を選択これにより、同じファイルを利用

Page 32: Unity on Windows 8.1

プラグインの使い道

Windows ストアアプリ側で使用(ストアアプリプロジェクトに追加)

Build した後に実行されるコードWindows ランタイム (.NET 4.5レベル)

Unityプロジェクト側 で使用(Unity Editor 内は .NET 3.5 レベル)

条件コンパイルを利用し、Unity Editor 内で動作しないコードは含めないこと

それぞれのライブラリーを

同じアセンブリ名、同じ名前空間にすること

Page 33: Unity on Windows 8.1

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;}

}}

Page 34: Unity on Windows 8.1

Pluginsフォルダに

Metroという名前でサブフォルダー作成

Page 35: Unity on Windows 8.1

DLLファイルをコピー

Page 36: Unity on Windows 8.1

“External Script Editor”を"Browse…" からエクスプローラーを呼び出し、devenv.exe を指定して、“Visual Studio 2012”に設定

Page 37: Unity on Windows 8.1

using UnityWinRTPlugin;

LiveTile tile = new LiveTile();

tile.UpdateTile(“Fire!”,DateTime.Now.ToShortTimeString());

Page 38: Unity on Windows 8.1