Unity for windows:iii–publishing Your Unity game to Windows Phone Store

Source: Internet
Author: User

Original address: Http://digitalerr0r.wordpress.com/2013/08/27/unity-for-windows-iiipublishing-to-windows-phone-store/

In part II we covered what can publish your game to the 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 t o Windows Phone 8 devices!

Important:this Guide was general and can be's of help for all Unity games, not just the example here. It ' s a living document and would be updated as I learn new stuff.

The Windows Phone Store gives your app a place-to-live, where millions of the users might buy the game you worked hard to Crea Te.

Again, you can follow these steps (ish) to publish any game you might has created for Windows Phone using Unity.

I. Handling the Back button

All Windows Phone devices are equipted with a back button:

It ' s The tiny arrow on the left side. It's a requirement from the Windows Phone Store, the This button is handeled. Luckily. Very

Unity comes with a nice set of tools to handle keyboard input–as you know. The Back button on Windows Phone 8 are 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 has, 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 want to export (we is 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 are Windows Phone 8, but 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-Want to support:

Click build from the build Settings screens 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 would now open the directory where the solution is exported.

To open this, you'll need Visual Studio 2012. If you is 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's the can change the splash screens by editing the splashscreenimage.jpg, and the game tiles (app icons so 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'll 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 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 for see there (Don ' t Chang E 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 would 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 View Code:

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 Steamla Nds. 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 is where we'll 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 does something else or make a Call, and then press the app tiles again to relaunch the Game–it would 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 was 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 was 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-Solution Unity created for us:

Vi. Creating Windows Phone Store Developer Account
Go to http://dev.windowsphone.com-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 on the 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!

About these adsLoading ...This entry is posted in Tutorial, Unity, Windows Phone. Bookmark the permalink.←Unity for Windows:ii–publishing Unity games to Windows storeunity for Windows iv–creating UI and saving the Highscore→5 Responses to Unity for windows:iii–publishing Your Unity game to Windows Phone Store
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.