SlideShare une entreprise Scribd logo
1  sur  23
Unity X Windows
跨平台實作營

台灣微軟 開發工具暨平台推廣處
資深協理 蔡孟儒 (Raymond)
2013/6
http://unity3d.com/pages/windows/gallery
3. MSDN + Unity 優惠!
1. 免費
Windows
add-ons

4. Unity Labs!
實地轉置+技術支援

5. App Visibility!
提名精選機會

2. 學生 & 新
創公司免費!
需求
• Unity4.3+: Unity免費版本或Unity Pro都可,兩者皆內建免費的 Windows Store和 Windows Phone
add-ons 給所有的Unity開發者。

• Visual Studio: 您可以使用任何 Visual Studio SKU,包括免費的 Visual Studio Express版本。若要移
植至 Windows 8.1 將需要 Visual Studio 2013 ;若要到 Windows 8 則可以使用 Visual Studio 2012。
這兩種版本可以在同一台電腦上一併安裝並執行。
• Windows 8.0 或更高的版本: 即便您未購買 Windows 8,您也可以在http://dev.windows.com 取得 90
天的免費評估版。如果您是在Apple的機器上執行 Mac OS X ,可以選擇如Boot Camp, VMWare 或
是Parallels等來執行Windows 8/8.1。
• Microsoft Account: Microsoft Account是免費的,可由以下網站申請 http://signup.live.com,獲取免費
的開發許可(Developer License)。
• Windows Store 帳戶: 這是在您要將遊戲上架至 Windows Store時的需求。您可選擇要註冊為個人或
公司帳戶,一旦完成註冊後則可同時提交至 Windows Phone Marketplace。個人帳戶註冊費用為$19,
公司帳戶為$99。(學生身份或新創公司則可享有第一年免年費優惠,可分別至

http://DreamSpark.com 及http://BizSpark.com 申請)

• Windows 測試機: Visual Studio內建的模擬器可以模擬諸如多點觸控、各種螢幕解析度等情境;但是,
我們仍建議您在具有觸控及運行Windows RT (ARM-based CPU)的實體機器上測試您的App。
移植
• 設計階段 — 在 Unity Editor 中設計遊戲
• 編譯階段 — 從 Unity Editor 生成 Windows App
• 執行階段 — 執行 Windows App
編譯階段 — 從 Unity Editor 生成 Windows App

建議先選擇XAML/C# Solution
選擇 Type 及 SDK (Windows Store App)
選擇Windows Store的類型 (Type)
• 我們建議先選擇XAML/C# solution ,這可讓你在所見即所得的 XAML UI 設計畫面中,快速建
立啟始畫面(splash screen)、設定(Settings)等各項 UI 元件。若選擇Direct3D & C++ 會生成較底
層的執行元件,會有最好的執行效能,但是會犧牲一些 UI 元件設計時的整合功能而拉長設
計時間。
選擇 SDK
• 我們建議您選擇 Windows 8.1 為發佈平台。然而,若要讓您的遊戲可以在8.0或8.1上皆能執
行的話,您可以:
• 直接生成一個 Windows 8.0 遊戲而不使用8.1的新功能。在此情形下您將以8.0的版本提交到Store,上架
後不論是執行 8.0 或 8.1 的使用者將能夠安裝並執行它。或者:
• 針對8.0 和 8.1生成兩個Visual Studio 專案。在這情形下您將提交兩個遊戲套件(packages)至Store,任某
版本作業系統上的使用者將只能看到其各自版本的遊戲。這種方式的優點在於可在8.1的專屬套件上新
增8.1的特別功能(如Big Tile等);缺點則是需要同時控管兩種版本。
Build 成功,以Visual Studio 開啟並編譯時…

Error: DEP0700: Registration of the app failed. Windows cannot install package “你的專案名” because the
package requires architecture ARM, but this computer has architecture x64 (0x80073cf3).
原因是 Unity 預設為 ARM-based CPU。解決方法: 至 Visual Studio 的 Build –> Configuration Manager 中選擇 x86
即可。
Build 不成功?
1. missing classes/methods

.NET Framework

error CS0103: The name 'File' does not exist in the current context”

原因:
• .NET 有很多種…(ASP.NET,
Silverlight, Windows Phone,
etc.)

Windows Store .NET Core
Mono C# runtime
解法:

http://blogs.msdn.com/b/mengtsai/archive/2014/01/16/unity-game-to-windows-store-compile-error-

missing-namespaces-classes.aspx?CommentPosted=true#commentmessage

• 將已實作並編譯出的MyPlugin.dll 加入 Unity 參考 (reference)
• 加入以下 using directives 即可!
#if UNITY_METRO_8_1 && !UNITY_EDITOR
using LegacySystem.IO;
#else
using System.IO;
#endif

優點:
1. 完全無需更動遊戲既有的程式碼。
2. 承1. 不會影響到移植至其他平台(iOS/Android, etc.)的相容性。
Build 不成功?
2. Plugins
• Play Maker、NGUI、Prime 31、Facebook SDK for
Unity
• 若要知道協力廠商的外掛程式是否相容於
Windows App ,可以使用 Xamarin提供的線上工具
免費掃描:http://scan.xamarin.com。

所有編譯階段可能遇到的問題,請參閱Windows
Store Porting Techniques 這份技術白皮書的Getting
your app to compile in Unity章節中(第4~6頁),有更
多如何解決API 與相關錯誤的說明。
移植流程
一旦您已經解決任何編譯階段時的錯誤,Unity將匯出一個專案檔,你將會使用 Visual
Studio 打開、測試、執行並發布你的遊戲,亦即以下的兩個步驟:
1.從Unity生成專案。(File -> Build Settings,選擇Windows Store App -> Build)
2.在Visual Studio 中編譯為可上架Windows 市集的二進位檔案
每次以 Unity生成專案的時候,可以每次都選擇相同的資料夾,這樣並不會覆寫到任何已在
Visual Studio中所作過的修改。Unity將只更新的以下資料夾及檔案:
1. 在您專案中的/Data資料夾
2. 專案中的reference assemblies
亦即,您可以直接於Visual Studio 改變專案、添加更多功能、更改manifest或設定檔,即便
您之後在Unity中更改了遊戲內容也不會丟失這些在 Visual Studio 中所作的改變。
另外要注意的是,如果您是更動了Unity的專案檔 (比如新增Plugins 或 references),您將
需要手動合併您的 Visual Studio 專案檔案。
移植成功了,我想上架
• 加入 IAP (In app purchase)?
• Windows Store App: http://code.msdn.microsoft.com/windowsapps/Licensing-APISample-19712f1a

• 加入動態磚?
• Windows Store App: http://code.msdn.microsoft.com/windowsapps/App-tiles-and-badgessample-5fc49148

• Windows Store 註冊及上架: http://www.slideshare.net/mengruts/windows-storeapp
• Windows Phone 註冊及上架: http://www.slideshare.net/mengruts/windowsphone-app-26866495
Untiy -> Windows Apps 資源
• Unity 官網: http://unity3d.com/pages/windows/
• 移植文件: http://unity3d.com/pages/windows/porting
• 論壇: http://forum.unity3d.com/forums/50-WindowsDevelopment
• 中文部落格:
http://blogs.msdn.com/b/mengtsai/archive/2014/02/05/windo
ws-store-unity.aspx
比賽/活動資訊
只要上架Windows Store/Windows Phone 市集…
App 怪獸爭霸戰
• 上架 Windows Store
或 Windows Phone
市集,即有機會獲得1
萬~10萬獎項

http://monster.azurewebsites.net/
Unity 舉辦:
鼓勵更多 Unity App 上架 Windows 市集
• 1~2 台 Windows
device (手機 or 平版)
• 10萬 Adduplex
impressions
• 共同行銷App
• 其他…

http://unity3d.com/pages/windows/offer

2014/2/19
BizSpark
創業夢想火花計畫

公司成立小於5年
年收入小於一百萬美金
以開發軟體產品或服務為公司的主要營業項目
微軟潛能創意盃 (Imagine Cup)
• 微軟潛能創意盃 (Imagine Cup)從2003年開始,每年皆吸引超過
100個國家,總計超過35萬學生精英組隊參加。
重要軌跡
年份

紀錄簡介

2003 年

首屆潛能創意盃亞太地區亞軍,並獲邀參加世界總決賽。

2006 年

數位創作組台灣代表隊獲世界前 6強頭銜。

2007 年

台灣代表隊「 Circle 」打敗全世界兩百多隊參賽者,獲得數位創作組全球亞軍。

2008 年

台灣取得軟體設計組、數位創作組、嵌入式系統開發組全球總決賽資格,創下新紀錄。

2009 年

台灣參賽人數成長近 3倍。晉級全球競賽第二輪隊伍將近 100 組,成長
將近 4 倍。

2009 年

打敗眾多強隊取得台灣代表權的兩支隊伍。最後於全球競賽中寫下嵌入式系統組世界前
發組世界前 6強的佳績。

2010 年

與教育部合作推出國際競賽台灣代表隊培育計畫,由產官學精英組成教練團,提供學生訓練與建議。

2010 年

台灣學生從 113 個國家、 32萬5千名全球學生精英脫穎而出,首次勇奪包含嵌入式系統組、數位創作組、
展望未來 2020 組等三項世界冠軍。

2011 年

台灣學生從 165 個國家、 35萬2千名全球學生精英脫穎而出,蟬連嵌入式系統組世界第一、數位創作組世
界第三。

12 強,以及軟體開
2013/07 曾志朗院士率團遠赴俄羅斯聖彼得堡
台灣「全方位聽力解決方案(Omni-Hearing Solution)」團隊榮獲軟體設計組
「世界公民」(World Citizenship)及「全球婦女賦權獎」(Women‘s
Empowerment Award-UN Women)兩競賽項目亞軍!
DreamSpark
學生夢想火花計畫

免費為學生提供 Microsoft 開發工具及軟體:
追求自己的夢想,開創新世代的重大技術突破,或藉此踏出職
場生涯的第一步。
• Unity 設計工具及 Visual Studio 2012/2013 的無縫整合
• Windows Store App & Windows Phone App 的免費 add-ons
• 台灣微軟在地技術支援 (MUGA & Unity Labs)
• 教師及學生免費軟體及上傳
• App 行銷支援
• 國外大型比賽 & Imagine Cup 潛能創意盃

Contenu connexe

En vedette

How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardSV Ruby on Rails Meetup
 
O.N.E. Glamour Brand Identity
O.N.E. Glamour Brand IdentityO.N.E. Glamour Brand Identity
O.N.E. Glamour Brand IdentityShakara Hinds
 

En vedette (7)

Windows 市集註冊及上架
Windows 市集註冊及上架Windows 市集註冊及上架
Windows 市集註冊及上架
 
SV Ruby on Rails Meetup - FlickMunk
SV Ruby on Rails Meetup - FlickMunkSV Ruby on Rails Meetup - FlickMunk
SV Ruby on Rails Meetup - FlickMunk
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardHow I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
 
Getting started windows phone unity
Getting started windows phone unityGetting started windows phone unity
Getting started windows phone unity
 
O.N.E. Glamour Brand Identity
O.N.E. Glamour Brand IdentityO.N.E. Glamour Brand Identity
O.N.E. Glamour Brand Identity
 
20131122 台北遊戲開發者論壇
20131122 台北遊戲開發者論壇20131122 台北遊戲開發者論壇
20131122 台北遊戲開發者論壇
 
Windows phone app 上架說明書
Windows phone app 上架說明書Windows phone app 上架說明書
Windows phone app 上架說明書
 

Similaire à 20140222 Unity Windows lab 移轉實作營

推推共享介绍 副本
推推共享介绍   副本推推共享介绍   副本
推推共享介绍 副本繁斌 孔
 
App inventor 教學講義 chapter1
App inventor 教學講義 chapter1App inventor 教學講義 chapter1
App inventor 教學講義 chapter1Jerry Wu
 
桌面應用工具軟體開發方案評估 (Based on Unity engine)
桌面應用工具軟體開發方案評估 (Based on Unity engine)桌面應用工具軟體開發方案評估 (Based on Unity engine)
桌面應用工具軟體開發方案評估 (Based on Unity engine)River Wang
 
ARM ® mbed™ 平台之研究及實作
ARM ® mbed™ 平台之研究及實作ARM ® mbed™ 平台之研究及實作
ARM ® mbed™ 平台之研究及實作艾鍗科技
 
Windows Phone Survey on Game Development
Windows Phone Survey on Game DevelopmentWindows Phone Survey on Game Development
Windows Phone Survey on Game DevelopmentEason Kuo
 
製作 Unity Plugin for iOS
製作 Unity Plugin for iOS製作 Unity Plugin for iOS
製作 Unity Plugin for iOSJohnny Sung
 
HTML5 生态系统和应用架构模型
HTML5 生态系统和应用架构模型HTML5 生态系统和应用架构模型
HTML5 生态系统和应用架构模型Tom Fan
 
Unity3d Script System & agile dev
Unity3d Script System & agile devUnity3d Script System & agile dev
Unity3d Script System & agile devJiadong Chen
 
Universal windows apps 開發—運用 html 及 java script
Universal windows apps 開發—運用 html 及 java scriptUniversal windows apps 開發—運用 html 及 java script
Universal windows apps 開發—運用 html 及 java scriptIan Chen
 
Crashlytics 使用教學
Crashlytics 使用教學Crashlytics 使用教學
Crashlytics 使用教學ShengWen Chiou
 
Windows Mobile 6 程式開發入門
Windows Mobile 6 程式開發入門Windows Mobile 6 程式開發入門
Windows Mobile 6 程式開發入門Chui-Wen Chiu
 
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第三天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第三天Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第三天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第三天Gelis Wu
 
使用最新 Edge 瀏覽器來進行開發​
使用最新 Edge 瀏覽器來進行開發​使用最新 Edge 瀏覽器來進行開發​
使用最新 Edge 瀏覽器來進行開發​Poy Chang
 
教學投影片01_Vb2005
教學投影片01_Vb2005教學投影片01_Vb2005
教學投影片01_Vb2005洋夫 葉
 
Flutter 踩雷心得
Flutter 踩雷心得Flutter 踩雷心得
Flutter 踩雷心得Weizhong Yang
 

Similaire à 20140222 Unity Windows lab 移轉實作營 (20)

推推共享介绍 副本
推推共享介绍   副本推推共享介绍   副本
推推共享介绍 副本
 
App inventor 教學講義 chapter1
App inventor 教學講義 chapter1App inventor 教學講義 chapter1
App inventor 教學講義 chapter1
 
桌面應用工具軟體開發方案評估 (Based on Unity engine)
桌面應用工具軟體開發方案評估 (Based on Unity engine)桌面應用工具軟體開發方案評估 (Based on Unity engine)
桌面應用工具軟體開發方案評估 (Based on Unity engine)
 
ARM ® mbed™ 平台之研究及實作
ARM ® mbed™ 平台之研究及實作ARM ® mbed™ 平台之研究及實作
ARM ® mbed™ 平台之研究及實作
 
Windows Phone Survey on Game Development
Windows Phone Survey on Game DevelopmentWindows Phone Survey on Game Development
Windows Phone Survey on Game Development
 
Android
AndroidAndroid
Android
 
製作 Unity Plugin for iOS
製作 Unity Plugin for iOS製作 Unity Plugin for iOS
製作 Unity Plugin for iOS
 
HTML5 生态系统和应用架构模型
HTML5 生态系统和应用架构模型HTML5 生态系统和应用架构模型
HTML5 生态系统和应用架构模型
 
Unity3d Script System & agile dev
Unity3d Script System & agile devUnity3d Script System & agile dev
Unity3d Script System & agile dev
 
Universal windows apps 開發—運用 html 及 java script
Universal windows apps 開發—運用 html 及 java scriptUniversal windows apps 開發—運用 html 及 java script
Universal windows apps 開發—運用 html 及 java script
 
Unity遊戲設計- Unity基礎指引
Unity遊戲設計- Unity基礎指引Unity遊戲設計- Unity基礎指引
Unity遊戲設計- Unity基礎指引
 
Unity遊戲程式設計- Unity基礎指引
Unity遊戲程式設計- Unity基礎指引Unity遊戲程式設計- Unity基礎指引
Unity遊戲程式設計- Unity基礎指引
 
Android_lecture_000
Android_lecture_000Android_lecture_000
Android_lecture_000
 
Crashlytics 使用教學
Crashlytics 使用教學Crashlytics 使用教學
Crashlytics 使用教學
 
Windows Mobile 6 程式開發入門
Windows Mobile 6 程式開發入門Windows Mobile 6 程式開發入門
Windows Mobile 6 程式開發入門
 
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第三天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第三天Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第三天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第三天
 
使用最新 Edge 瀏覽器來進行開發​
使用最新 Edge 瀏覽器來進行開發​使用最新 Edge 瀏覽器來進行開發​
使用最新 Edge 瀏覽器來進行開發​
 
教學投影片01_Vb2005
教學投影片01_Vb2005教學投影片01_Vb2005
教學投影片01_Vb2005
 
行動技術開發概論
行動技術開發概論行動技術開發概論
行動技術開發概論
 
Flutter 踩雷心得
Flutter 踩雷心得Flutter 踩雷心得
Flutter 踩雷心得
 

Plus de Meng-Ru (Raymond) Tsai

20211119 ntuh azure hpc workshop final
20211119 ntuh azure hpc workshop final20211119 ntuh azure hpc workshop final
20211119 ntuh azure hpc workshop finalMeng-Ru (Raymond) Tsai
 
202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課
202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課
202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課Meng-Ru (Raymond) Tsai
 
20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data ai20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data aiMeng-Ru (Raymond) Tsai
 
2 module07 cognitive services and the bot framework
2 module07 cognitive services and the bot framework2 module07 cognitive services and the bot framework
2 module07 cognitive services and the bot frameworkMeng-Ru (Raymond) Tsai
 
20170123 外交學院 大數據趨勢與應用
20170123 外交學院 大數據趨勢與應用20170123 外交學院 大數據趨勢與應用
20170123 外交學院 大數據趨勢與應用Meng-Ru (Raymond) Tsai
 
20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望
20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望
20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望Meng-Ru (Raymond) Tsai
 
20170108 微軟大數據整合解決方案- cortana intelligence suite
20170108 微軟大數據整合解決方案- cortana intelligence suite20170108 微軟大數據整合解決方案- cortana intelligence suite
20170108 微軟大數據整合解決方案- cortana intelligence suiteMeng-Ru (Raymond) Tsai
 
20160323 台大 微軟學生大使招生分享會
20160323 台大 微軟學生大使招生分享會20160323 台大 微軟學生大使招生分享會
20160323 台大 微軟學生大使招生分享會Meng-Ru (Raymond) Tsai
 
20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymondMeng-Ru (Raymond) Tsai
 
20151016 中興大學 big data + machine learning
20151016 中興大學 big data + machine learning20151016 中興大學 big data + machine learning
20151016 中興大學 big data + machine learningMeng-Ru (Raymond) Tsai
 
20150723 windows 10 uwp 20150723 24 台北遊戲論壇
20150723 windows 10 uwp 20150723 24 台北遊戲論壇20150723 windows 10 uwp 20150723 24 台北遊戲論壇
20150723 windows 10 uwp 20150723 24 台北遊戲論壇Meng-Ru (Raymond) Tsai
 

Plus de Meng-Ru (Raymond) Tsai (20)

20211119 ntuh azure hpc workshop final
20211119 ntuh azure hpc workshop final20211119 ntuh azure hpc workshop final
20211119 ntuh azure hpc workshop final
 
202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課
202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課
202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課
 
20190627 ai+blockchain
20190627 ai+blockchain20190627 ai+blockchain
20190627 ai+blockchain
 
20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data ai20171024 文化大學 1 azure big data ai
20171024 文化大學 1 azure big data ai
 
20171024 文化大學 2 big data ai
20171024 文化大學 2 big data ai20171024 文化大學 2 big data ai
20171024 文化大學 2 big data ai
 
20180126 microsoft ai on healthcare
20180126 microsoft ai on healthcare20180126 microsoft ai on healthcare
20180126 microsoft ai on healthcare
 
20170330 彰基 azure healthcare
20170330 彰基 azure healthcare20170330 彰基 azure healthcare
20170330 彰基 azure healthcare
 
4 module09 iot
4 module09 iot4 module09 iot
4 module09 iot
 
3 module06 monitoring
3 module06 monitoring3 module06 monitoring
3 module06 monitoring
 
2 module07 cognitive services and the bot framework
2 module07 cognitive services and the bot framework2 module07 cognitive services and the bot framework
2 module07 cognitive services and the bot framework
 
1 module04 dev ops
1 module04 dev ops1 module04 dev ops
1 module04 dev ops
 
20170123 外交學院 大數據趨勢與應用
20170123 外交學院 大數據趨勢與應用20170123 外交學院 大數據趨勢與應用
20170123 外交學院 大數據趨勢與應用
 
20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望
20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望
20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望
 
20170108 微軟大數據整合解決方案- cortana intelligence suite
20170108 微軟大數據整合解決方案- cortana intelligence suite20170108 微軟大數據整合解決方案- cortana intelligence suite
20170108 微軟大數據整合解決方案- cortana intelligence suite
 
20160930 bot framework workshop
20160930 bot framework workshop20160930 bot framework workshop
20160930 bot framework workshop
 
20160930 bot framework workshop
20160930 bot framework workshop20160930 bot framework workshop
20160930 bot framework workshop
 
20160323 台大 微軟學生大使招生分享會
20160323 台大 微軟學生大使招生分享會20160323 台大 微軟學生大使招生分享會
20160323 台大 微軟學生大使招生分享會
 
20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond20160304 blockchain in fsi client ready raymond
20160304 blockchain in fsi client ready raymond
 
20151016 中興大學 big data + machine learning
20151016 中興大學 big data + machine learning20151016 中興大學 big data + machine learning
20151016 中興大學 big data + machine learning
 
20150723 windows 10 uwp 20150723 24 台北遊戲論壇
20150723 windows 10 uwp 20150723 24 台北遊戲論壇20150723 windows 10 uwp 20150723 24 台北遊戲論壇
20150723 windows 10 uwp 20150723 24 台北遊戲論壇
 

20140222 Unity Windows lab 移轉實作營

  • 1. Unity X Windows 跨平台實作營 台灣微軟 開發工具暨平台推廣處 資深協理 蔡孟儒 (Raymond)
  • 4. 3. MSDN + Unity 優惠! 1. 免費 Windows add-ons 4. Unity Labs! 實地轉置+技術支援 5. App Visibility! 提名精選機會 2. 學生 & 新 創公司免費!
  • 5. 需求 • Unity4.3+: Unity免費版本或Unity Pro都可,兩者皆內建免費的 Windows Store和 Windows Phone add-ons 給所有的Unity開發者。 • Visual Studio: 您可以使用任何 Visual Studio SKU,包括免費的 Visual Studio Express版本。若要移 植至 Windows 8.1 將需要 Visual Studio 2013 ;若要到 Windows 8 則可以使用 Visual Studio 2012。 這兩種版本可以在同一台電腦上一併安裝並執行。 • Windows 8.0 或更高的版本: 即便您未購買 Windows 8,您也可以在http://dev.windows.com 取得 90 天的免費評估版。如果您是在Apple的機器上執行 Mac OS X ,可以選擇如Boot Camp, VMWare 或 是Parallels等來執行Windows 8/8.1。 • Microsoft Account: Microsoft Account是免費的,可由以下網站申請 http://signup.live.com,獲取免費 的開發許可(Developer License)。 • Windows Store 帳戶: 這是在您要將遊戲上架至 Windows Store時的需求。您可選擇要註冊為個人或 公司帳戶,一旦完成註冊後則可同時提交至 Windows Phone Marketplace。個人帳戶註冊費用為$19, 公司帳戶為$99。(學生身份或新創公司則可享有第一年免年費優惠,可分別至 http://DreamSpark.com 及http://BizSpark.com 申請) • Windows 測試機: Visual Studio內建的模擬器可以模擬諸如多點觸控、各種螢幕解析度等情境;但是, 我們仍建議您在具有觸控及運行Windows RT (ARM-based CPU)的實體機器上測試您的App。
  • 6. 移植 • 設計階段 — 在 Unity Editor 中設計遊戲 • 編譯階段 — 從 Unity Editor 生成 Windows App • 執行階段 — 執行 Windows App
  • 7. 編譯階段 — 從 Unity Editor 生成 Windows App 建議先選擇XAML/C# Solution
  • 8. 選擇 Type 及 SDK (Windows Store App) 選擇Windows Store的類型 (Type) • 我們建議先選擇XAML/C# solution ,這可讓你在所見即所得的 XAML UI 設計畫面中,快速建 立啟始畫面(splash screen)、設定(Settings)等各項 UI 元件。若選擇Direct3D & C++ 會生成較底 層的執行元件,會有最好的執行效能,但是會犧牲一些 UI 元件設計時的整合功能而拉長設 計時間。 選擇 SDK • 我們建議您選擇 Windows 8.1 為發佈平台。然而,若要讓您的遊戲可以在8.0或8.1上皆能執 行的話,您可以: • 直接生成一個 Windows 8.0 遊戲而不使用8.1的新功能。在此情形下您將以8.0的版本提交到Store,上架 後不論是執行 8.0 或 8.1 的使用者將能夠安裝並執行它。或者: • 針對8.0 和 8.1生成兩個Visual Studio 專案。在這情形下您將提交兩個遊戲套件(packages)至Store,任某 版本作業系統上的使用者將只能看到其各自版本的遊戲。這種方式的優點在於可在8.1的專屬套件上新 增8.1的特別功能(如Big Tile等);缺點則是需要同時控管兩種版本。
  • 9. Build 成功,以Visual Studio 開啟並編譯時… Error: DEP0700: Registration of the app failed. Windows cannot install package “你的專案名” because the package requires architecture ARM, but this computer has architecture x64 (0x80073cf3). 原因是 Unity 預設為 ARM-based CPU。解決方法: 至 Visual Studio 的 Build –> Configuration Manager 中選擇 x86 即可。
  • 10. Build 不成功? 1. missing classes/methods .NET Framework error CS0103: The name 'File' does not exist in the current context” 原因: • .NET 有很多種…(ASP.NET, Silverlight, Windows Phone, etc.) Windows Store .NET Core Mono C# runtime
  • 11. 解法: http://blogs.msdn.com/b/mengtsai/archive/2014/01/16/unity-game-to-windows-store-compile-error- missing-namespaces-classes.aspx?CommentPosted=true#commentmessage • 將已實作並編譯出的MyPlugin.dll 加入 Unity 參考 (reference) • 加入以下 using directives 即可! #if UNITY_METRO_8_1 && !UNITY_EDITOR using LegacySystem.IO; #else using System.IO; #endif 優點: 1. 完全無需更動遊戲既有的程式碼。 2. 承1. 不會影響到移植至其他平台(iOS/Android, etc.)的相容性。
  • 12. Build 不成功? 2. Plugins • Play Maker、NGUI、Prime 31、Facebook SDK for Unity • 若要知道協力廠商的外掛程式是否相容於 Windows App ,可以使用 Xamarin提供的線上工具 免費掃描:http://scan.xamarin.com。 所有編譯階段可能遇到的問題,請參閱Windows Store Porting Techniques 這份技術白皮書的Getting your app to compile in Unity章節中(第4~6頁),有更 多如何解決API 與相關錯誤的說明。
  • 13. 移植流程 一旦您已經解決任何編譯階段時的錯誤,Unity將匯出一個專案檔,你將會使用 Visual Studio 打開、測試、執行並發布你的遊戲,亦即以下的兩個步驟: 1.從Unity生成專案。(File -> Build Settings,選擇Windows Store App -> Build) 2.在Visual Studio 中編譯為可上架Windows 市集的二進位檔案 每次以 Unity生成專案的時候,可以每次都選擇相同的資料夾,這樣並不會覆寫到任何已在 Visual Studio中所作過的修改。Unity將只更新的以下資料夾及檔案: 1. 在您專案中的/Data資料夾 2. 專案中的reference assemblies 亦即,您可以直接於Visual Studio 改變專案、添加更多功能、更改manifest或設定檔,即便 您之後在Unity中更改了遊戲內容也不會丟失這些在 Visual Studio 中所作的改變。 另外要注意的是,如果您是更動了Unity的專案檔 (比如新增Plugins 或 references),您將 需要手動合併您的 Visual Studio 專案檔案。
  • 14. 移植成功了,我想上架 • 加入 IAP (In app purchase)? • Windows Store App: http://code.msdn.microsoft.com/windowsapps/Licensing-APISample-19712f1a • 加入動態磚? • Windows Store App: http://code.msdn.microsoft.com/windowsapps/App-tiles-and-badgessample-5fc49148 • Windows Store 註冊及上架: http://www.slideshare.net/mengruts/windows-storeapp • Windows Phone 註冊及上架: http://www.slideshare.net/mengruts/windowsphone-app-26866495
  • 15. Untiy -> Windows Apps 資源 • Unity 官網: http://unity3d.com/pages/windows/ • 移植文件: http://unity3d.com/pages/windows/porting • 論壇: http://forum.unity3d.com/forums/50-WindowsDevelopment • 中文部落格: http://blogs.msdn.com/b/mengtsai/archive/2014/02/05/windo ws-store-unity.aspx
  • 17. App 怪獸爭霸戰 • 上架 Windows Store 或 Windows Phone 市集,即有機會獲得1 萬~10萬獎項 http://monster.azurewebsites.net/
  • 18. Unity 舉辦: 鼓勵更多 Unity App 上架 Windows 市集 • 1~2 台 Windows device (手機 or 平版) • 10萬 Adduplex impressions • 共同行銷App • 其他… http://unity3d.com/pages/windows/offer 2014/2/19
  • 20. 微軟潛能創意盃 (Imagine Cup) • 微軟潛能創意盃 (Imagine Cup)從2003年開始,每年皆吸引超過 100個國家,總計超過35萬學生精英組隊參加。 重要軌跡 年份 紀錄簡介 2003 年 首屆潛能創意盃亞太地區亞軍,並獲邀參加世界總決賽。 2006 年 數位創作組台灣代表隊獲世界前 6強頭銜。 2007 年 台灣代表隊「 Circle 」打敗全世界兩百多隊參賽者,獲得數位創作組全球亞軍。 2008 年 台灣取得軟體設計組、數位創作組、嵌入式系統開發組全球總決賽資格,創下新紀錄。 2009 年 台灣參賽人數成長近 3倍。晉級全球競賽第二輪隊伍將近 100 組,成長 將近 4 倍。 2009 年 打敗眾多強隊取得台灣代表權的兩支隊伍。最後於全球競賽中寫下嵌入式系統組世界前 發組世界前 6強的佳績。 2010 年 與教育部合作推出國際競賽台灣代表隊培育計畫,由產官學精英組成教練團,提供學生訓練與建議。 2010 年 台灣學生從 113 個國家、 32萬5千名全球學生精英脫穎而出,首次勇奪包含嵌入式系統組、數位創作組、 展望未來 2020 組等三項世界冠軍。 2011 年 台灣學生從 165 個國家、 35萬2千名全球學生精英脫穎而出,蟬連嵌入式系統組世界第一、數位創作組世 界第三。 12 強,以及軟體開
  • 23. • Unity 設計工具及 Visual Studio 2012/2013 的無縫整合 • Windows Store App & Windows Phone App 的免費 add-ons • 台灣微軟在地技術支援 (MUGA & Unity Labs) • 教師及學生免費軟體及上傳 • App 行銷支援 • 國外大型比賽 & Imagine Cup 潛能創意盃

Notes de l'éditeur

  1. Of course, not everyone needs/wants to code to Direct X.. You might already have a game that is written using a portable library or portable library… Microsoft is bringing as many as we can to support our platforms… The ones that have native graphics (or audio) are built on top of directX .. Built on Direct X Meet Windows Phone and Windows Store API & design patterns..
  2. http://unity3d.com/pages/windows/gallery