SlideShare a Scribd company logo
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 潛能創意盃

More Related Content

PPTX
Game development using monogame
PPTX
UX Mag article導讀分享
PPSX
多媒體伺服器加分題
PDF
App inventor 1
PPTX
Unity to Windows App 開發 angus
PDF
Windows Phone 7 on Visual Studio 2010
PPTX
Orientation Program
PPTX
Android程式設計(6)
Game development using monogame
UX Mag article導讀分享
多媒體伺服器加分題
App inventor 1
Unity to Windows App 開發 angus
Windows Phone 7 on Visual Studio 2010
Orientation Program
Android程式設計(6)

Viewers also liked (7)

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

More from Meng-Ru (Raymond) Tsai (20)

PDF
2024年11月14日的講座《AI 業界應用與未來趨勢》由微軟Azure HPC/AI工程部的主要計劃經理蔡孟儒主講,涵蓋了生成式AI的進展、如何客製化A...
PDF
Accelerating EDA workloads on Azure – Best Practice and benchmark on Intel EM...
PDF
Microsoft Generative AI and Medical case studies.
PDF
20211119 ntuh azure hpc workshop final
PDF
202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課
PDF
20190627 ai+blockchain
PDF
20171024 文化大學 1 azure big data ai
PDF
20171024 文化大學 2 big data ai
PPTX
20180126 microsoft ai on healthcare
PDF
20170330 彰基 azure healthcare
PPTX
4 module09 iot
PPTX
3 module06 monitoring
PPTX
2 module07 cognitive services and the bot framework
PPTX
1 module04 dev ops
PDF
20170123 外交學院 大數據趨勢與應用
PDF
20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望
PDF
20170108 微軟大數據整合解決方案- cortana intelligence suite
PPTX
20160930 bot framework workshop
PPTX
20160930 bot framework workshop
PPTX
20160323 台大 微軟學生大使招生分享會
2024年11月14日的講座《AI 業界應用與未來趨勢》由微軟Azure HPC/AI工程部的主要計劃經理蔡孟儒主講,涵蓋了生成式AI的進展、如何客製化A...
Accelerating EDA workloads on Azure – Best Practice and benchmark on Intel EM...
Microsoft Generative AI and Medical case studies.
20211119 ntuh azure hpc workshop final
202002 DIGI+Talent數位網路學院線上課程: 五大領堿先修課
20190627 ai+blockchain
20171024 文化大學 1 azure big data ai
20171024 文化大學 2 big data ai
20180126 microsoft ai on healthcare
20170330 彰基 azure healthcare
4 module09 iot
3 module06 monitoring
2 module07 cognitive services and the bot framework
1 module04 dev ops
20170123 外交學院 大數據趨勢與應用
20160525 跨界新識力沙龍論壇 機器學習與跨業應用展望
20170108 微軟大數據整合解決方案- cortana intelligence suite
20160930 bot framework workshop
20160930 bot framework workshop
20160323 台大 微軟學生大使招生分享會
Ad

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 潛能創意盃

Editor's Notes

  • #2: 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..
  • #5: http://unity3d.com/pages/windows/gallery