Touch-ups before publishing your Unity game to Windows store

Two days ago, i have published my first game to windows store and  below are the steps which i followed before publishing the game…..

I will continue where digitalerr0r has left.(This article is just an extension or add on to what digitalerr0r has described)

After you have added the code snippet for snapped view,everything looks good,except that you have to show a message “That the game is paused and to resume you have to move to Full screen “.Also there is one more view called Filled View which needs to be handled on Windows 8.

Bongo Soccer Game on windows store
Bongo Soccer Game on windows store

Mono C# Script to  pause the sound (if any)

using UnityEngine;<br />using System.Collections;<br /><br />public class Windows8Handler {<br />    public GUIText paused=GameObject.Find("Paused").GetComponent();<br /><br />	public  void PauseGame(bool p)<br />	{<br />		if (p)<br />		{<br />			Time.timeScale = 0.0f;<br />			AudioListener.pause=true;<br /><br />		}<br />		else<br />		{<br />			Time.timeScale = 1.0f;<br />			AudioListener.pause=false;<br /><br />		}<br />	}<br />}

Build the Visual studio C# solution again to have this script change to turn up.

C#/XAML (App.Xaml.cs) code snippet to show the pause message and support FILLED view

<br />//Add this line to app class<br />private string pauseMe = string.Format("GAME PAUSED!!{0}PLAY IN FULL SCREEN MODE", Environment.NewLine);

<br />//Add this after Window.Current.Activate();<br />Window.Current.SizeChanged += Current_SizeChanged;<br />}<br /><br />void Current_SizeChanged(object sender, WindowSizeChangedEventArgs e)<br />{<br />ApplicationViewState myViewState = ApplicationView.Value;<br /><br />if (myViewState == ApplicationViewState.Snapped)<br />{<br />AppCallbacks.Instance.InvokeOnAppThread(new AppCallbackItem(() =&gt;<br />{<br />Windows8Handler handler = new Windows8Handler();<br />handler.PauseGame(true);<br />handler.paused.text = pauseMe;<br /><br />}), false);<br />}<br />else if (myViewState == ApplicationViewState.Filled)<br />{<br />AppCallbacks.Instance.InvokeOnAppThread(new AppCallbackItem(() =&gt;<br />{<br /><br />Windows8Handler handler = new Windows8Handler();<br />handler.PauseGame(true);<br />handler.paused.text = pauseMe;<br />}), false);<br /><br />}<br />else<br />{<br />AppCallbacks.Instance.InvokeOnAppThread(new AppCallbackItem(() =&gt;<br />{<br />Windows8Handler handler = new Windows8Handler();<br />handler.PauseGame(false);<br />handler.paused.text = string.Empty;<br />}), false);<br />}<br />}

Once this is done just run your solution to see your game in action and also verify the snap and filled views.

Next,you have to add a privacy policy to your game (which will be displayed in the app store)

Adding privacy Policy 

Verify the privacy policy on the settings charm. Now you can build the appx file in master mode to upload .

Important points to avoid game rejection

  • Choose an appropriate age group(12+ if you are doubtful),countries  for your game and also provide valid game rating certificate.
  • Other than keyboard game inputs,you should support either mouse or touch (as most of the PCs and Tablets support).

Advertisements

3 thoughts on “Touch-ups before publishing your Unity game to Windows store

  1. I can't tell you how excited I am so see your solution here, as an addition the digitalerr0r's blog.

    I've been racking my brain trying to figure out why my game wasn't pausing in Windows Snap View, but it turns out that my game WAS pausing, I just hand't turned off the audio, so the background music was playing as normal, making me think that the game was NOT paused.

    This solution is so simple, yet I was never going to figure it out until I saw your pingback on digitalerr0r's blog!

    Thanks so much!

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s