Unity for Windows: III–Publishing your unity game to Windows Phone Store
原地址:http://digitalerr0r.wordpress.com/2013/08/27/unity-for-windows-iiipublishing-to-windows-phone-store/
![]()
In Part II we covered how you can publish your game to Windows Store, so it runs on Windows 8 driven devices.
Today we are going to export our game to Windows Phone 8, and publish it to the Windows Phone Store, making it available to Windows Phone 8 devices! ![]()
Important: This guide is general and can be of help for all Unity games, not just the example here. It’s a living document and will be updated as I learn new stuff.
The Windows Phone Store gives your app a place to live, where millions of users might buy the game you worked hard to create.
Again, you can follow these steps (ish) to publish any game you might have created for Windows Phone using Unity.
I. Handling the Back button
All Windows Phone devices is equipted with a back button:![]()
It’s the tiny arrow on the left side. It is a requirement from the Windows Phone Store that this button is handeled. Luckily, this is very easy to do.
Unity comes with a nice set of tools to handle keyboard input – as you know. The back button on Windows Phone 8 is the same as the Escape key, so to implement logic on your back button, just check if the Escape key was pressed and handle it correctly:
if (Input.GetKeyDown(KeyCode.Escape))
{
HandleBackbutton();
}
Then the body of this function in a level might look like:
void HandleBackbutton()
{
Application.LoadLevel(“MainMenu”);
}
or on the main menu:
void HandleBackbutton()
{
Application.Quit();
}
In your game handler logic for all the various scenes you might have, add this to every scene to make sure the back button is handled correctly! ![]()
Simple, right? ![]()
II. Setting publishing settings in Unity and exporting
Open the game you want to export (we are using the game from Part I) in Unity, click File->Build Settings.. to open the project settings properties:
![]()
Select Windows Phone 8 and click Switch Platform.
Now the main platform for the game is Windows Phone 8, but you can still export to the other platforms as well.
Click Player Settings.. to open the player settings properties:
![]()
Set the Orientation to Auto Rotation:![]()
Then select the orientations you want to support:![]()
Click Build from the Build Settings screen and select a folder where to place the solution. I created a folder named WindowsPhone8 in the Unity project folder. Let it build the solution, it might take a few minutes.
Unity will now open the directory where the solution was exported.![]()
To open this, you will need Visual Studio 2012. If you are a student you might can get a licence from www.dreamspark.com, if not, you can download the express version for free here: http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-phone
When installed, open the Invad0rs solution. You can see the project is loaded:
![]()
Here you can change the splash screen by editing the SplashScreenImage.jpg, and the game tiles (app icons that can be seen on the phone):
![]()
Now, test if the application runds by either running it on a Device or in the Simulator (included in Visual Studio 2012).
If you want to run on a device, just connect it to the computer and press play in Visual Studio:![]()
Next, we need to set a few properties for the assembly we will generate. Click PROJECT->Invad0rs properties![]()
In the Application tab, press the Assembly Information button:
Set the language to the main language of the game (must!), and if needed, change the rest of the properties.
![]()
Click OK.
Next, we must change the Applications Tiles (the icon/tile the player sees on the phone). Go to the Assets folder of the exported solution (not in the Unity solution) and edit the files you see there (don’t change the resolution):
![]()
(Don’t worry about the AlignmentGrid – just leave it)
Also, change the files in the Tiles folder:![]()
III. Adding support for Fast App Resume
To explain this simple, Fast App Resume will resume the game from where it left if you decide to go out of the game (using the Windows button) and then relaunch the game.
Open your solution and right click the WMAppManigest.xaml file and select :
![]()
The start of the code looks something like this, and I’m highlighting the line of interest:
<?xml version=”1.0″ encoding=”utf-8″?>
<Deployment xmlns=”http://schemas.microsoft.com/windowsphone/2012/deployment”AppPlatformVersion=”8.0″>
<DefaultLanguage xmlns=”” code=”en-US” />
<App xmlns=”” ProductID=”{8F1EA4A3-0B57-4556-970D-D27298EA5B45}” Title=”SteamLands” RuntimeType=”Silverlight” Version=”1.0.0.0″ Genre=”apps.normal” Author=”Crust Development” Description=”You got lost in the wrong streets of SteamLands. Survive.” Publisher=”Crust Development” PublisherID=”{36e0404a-2921-4b73-8632-3bf364496337}”>
<IconPath IsRelative=”true” IsResource=”false”>Assets\ApplicationIcon.png</IconPath>
<Capabilities>
<Capability Name=”ID_CAP_IDENTITY_DEVICE” />
<Capability Name=”ID_CAP_MEDIALIB_AUDIO” />
<Capability Name=”ID_CAP_MEDIALIB_PLAYBACK” />
<Capability Name=”ID_CAP_NETWORKING” />
<Capability Name=”ID_CAP_SENSORS” />
</Capabilities>
<Tasks>
<DefaultTask Name=”_default” NavigationPage=”MainPage.xaml” />
</Tasks>
<Tokens>
This line is where we will all the Fast App Resume attribute:
ActivationPolicy=”Resume”
Modify the line so it looks like this:
<DefaultTask Name=”_default” NavigationPage=”MainPage.xaml” ActivationPolicy=”Resume”/>
Done – if you run the game on your device, and play for a while, then press the Windows key to do something else or make a call, and then press the app tile again to relaunch the game – it will continue from where you left!
IV. Setting the build to Master
When publishing a Windows Phone 8 game, you need to set the build settings to Master. This is to get rid of the Development Build message in the bottom right side of the app.
![]()
V. Testing the solution with the built in Store Test Kit
Before we can send in the app, we need to do a Store Test on the app. Click PROJECT->Open Store Test Kit![]()
Run the automated tests to make sure the first test is passed (the XAP Package Requirements):![]()
Build the solution in Release mode:![]()
You can find the package in the Bin folder of the generated Visual Studio 2012 solution Unity created for us:![]()
VI. Creating you Windows Phone Store developer account
Go to http://dev.windowsphone.com to register your Windows Phone Developer Account.
VII. Submit the Windows Phone 8 game
Submitting the app is simple. Go to http://dev.windowsphone.com and click Dashboard:![]()
Now, click SUBMIT APP:
![]()
Follow these steps and upload the XAP file you created earlier at step 2:![]()
After this, click Review and submit to send the app for review. This can take a few days.
If it passes, congratulations! If not, fix the issues and try again, but don’t give up! ![]()
Good luck!
5 Responses to Unity for Windows: III–Publishing your unity game to Windows Phone Store
Unity for Windows: III–Publishing your unity game to Windows Phone Store的更多相关文章
- Unity for Windows: II – Publishing Unity games to Windows Store
原地址:http://digitalerr0r.wordpress.com/2013/08/27/unity-for-windows-ii-publishing-to-windows-8/ Windo ...
- 如何实现Windows Phone代码与Unity相互通信(事件方式)
源地址:http://www.cnblogs.com/petto/p/3909063.html 一些废话 昨天写一篇今天写一篇.不是我闲的蛋疼,是今天一天碰到了好几个恼人的问题,浪费一天时间搞定.本文 ...
- 对《[Unity官方实例教程 秘密行动] Unity官方教程《秘密行动》(十二) 角色移动》的一些笔记和个人补充,解决角色在地形上移动时穿透问题。
这里素材全是网上找的. 教程看这里: [Unity官方实例教程 秘密行动] Unity官方教程<秘密行动>(九) 角色初始设定 一.模型设置: 1.首先设置模型的动作无限循环. 不设置的话 ...
- Unity优化之GC——合理优化Unity的GC
转载请标明出处http://www.cnblogs.com/zblade/ 最近有点繁忙,白天干活晚上抽空写点翻译,还要运动,所以翻译工作进行的有点缓慢 =.= PS: 最近重新回来更新了一遍,文 ...
- Unity 3(二):Unity在AOP方面的应用
本文关注以下方面(环境为VS2012..Net Framework 4.5以及Unity 3): AOP简介: Interception using Unity示例 配置文件示例 一.AOP简介 AO ...
- 使用Unity解耦你的系统—PART4——Unity&PIAB
在前面几篇有关Unity学习的文章中,我对Unity的一些常用功能进行介绍,包括:Unity的基本知识.管理对象之间的关系.生命周期.依赖注入等,今天则是要介绍Unity的另外一个重要功能——拦截(I ...
- Unity编程标准导引-3.4 Unity中的对象池
本文为博主原创文章,欢迎转载.请保留博主链接http://blog.csdn.net/andrewfan Unity编程标准导引-3.4 Unity中的对象池 本节通过一个简单的射击子弹的示例来介绍T ...
- Windows Phone Studio-任何人都能开发Windows Phone App的在线工具
在一段时间的内测以后,微软于今天早些时候发布了其Windows Phone应用开发的在线工具,名字叫做Windows Phone Studio.其意义在于,通过简单的内容添加和样式选择,实现Windo ...
- Windows Internals学习笔记(六)Windows关键系统组件
参考资料: 1. <Windows Internals> 2. Dependency Walker 3. Ntoskrnl.exe 4. Livekd的使用 5. WinDbg的使用(一) ...
随机推荐
- NOIP2017 D2T3列队
这题我改了三天,考场上部分分暴力拿了50,考完试发现与正解很接近只是没写出来. 对于每一行和最后一列建n+1颗线段树,维护前缀和. 复杂度qlogn 假如你移动一个坐标为(x,y)的人,你要将第x行线 ...
- bzoj 1626: [Usaco2007 Dec]Building Roads 修建道路 -- 最小生成树
1626: [Usaco2007 Dec]Building Roads 修建道路 Time Limit: 5 Sec Memory Limit: 64 MB Description Farmer J ...
- bzoj1977 次小生成树
Description 小 C 最近学了很多最小生成树的算法,Prim 算法.Kurskal 算法.消圈算法等等. 正当小 C 洋洋得意之时,小 P 又来泼小 C 冷水了.小 P 说,让小 C 求出一 ...
- HDU 5644 King's Pilots 费用流
King's Pilots 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5644 Description The military parade w ...
- SpringMVC 3.1.1版本下的单元测试WEB-INF路径问题
假设Spring配置文件为applicationContext.xml 一.Spring配置文件在类路径下面 在Spring的java应用程序中,一般我们的Spring的配置文件都是放在放在类路径下面 ...
- 为什么MyISAM会比Innodb的查询速度快
INNODB在做SELECT的时候,要维护的东西比MYISAM引擎多很多: 1)数据块,INNODB要缓存,MYISAM只缓存索引块, 这中间还有换进换出的减少: 2)innodb寻址要映射到块,再 ...
- 《C# to IL》第二章 IL基础
如果你真的想要理解C#代码,那么最好的方法就是通过理解由C#编译器生成的代码.本章和下面两章将关注于此. 我们将用一个短小的C#程序来揭开IL的神秘面纱,并解释由编译器生成的IL代码.这样,我们就可以 ...
- jquery-ajax请求:超时设置,增加 loading 提升体验
前端发送Ajax请求到服务器,服务器返回数据这一过程,因原因不同耗时长短也有差别,且这段时间内页面显示空白.如何优化这段时间内的交互体验,以及长时间内服务器仍未返回数据这一问题,是我们开发中不容忽视的 ...
- HTML5项目笔记4:使用Audio API设计绚丽的HTML5音乐播放器
HTML5 有两个很炫的元素,就是Audio和 Video,可以用他们在页面上创建音频播放器和视频播放器,制作一些效果很不错的应用. 无论是视屏还是音频,都是一个容器文件,包含了一些音频轨道,视频轨道 ...
- InvalidateRect()与Invalidate()的用法(转)
BOOL InvalidateRect( HWND hWnd, // 窗口句柄 CONST RECT* lpRect, // 矩形区域 BOOL bErase ...