DevDiary – Unity 5 vs Windows Phone walkthrough

VS

Microsoft logo

It’s all started on a nice day at January’s end, it was a rainy day, we were very bored so we decided to give us some pain… We have started developing MatchYS some days before the “mad choice” to deploy it something like: EVERYWHERE. (ndr. AppStore, Google Play, Amazon Store and Windows Store) We never did it, because the poor business opportunities offered by the Microsoft shaky digital platform. It’s not a “j’accuse” but we read about other, more famous, developers who released their creations on Windows mobile store with awful results. We have small resources as indies and we have to choose carefully where to spend them, this is all the matter. By the way we chose to go on our plan so we started to take informations about Windows Phone deploying details.

MatchYS promo

1st fact: Unity 5 is really powerful creation instrument into right hands and, release by release, it is becoming an even more useful and handy tool.

2nd fact: If you are planning to develop a game or an app on Windows Phone you have to be prepared to download tons of GB of installation stuff.

3rd fact: Have you ever deployed an app on same time between iOS and Android? Yes? Well, forget right now to do the same on Windows, you will have to focus all of your energy on it.

Reading as i started this you would think (and troll): “Yeah, yeah, it’s catasthropic!” – No, it’s much worst. Do you want a taste? Use the search engine you like to obtain clear informations about an commonplace”problem” like Windows Phone required app icons into Unity 5. Enjoy your drama!

Yes, i know, you feel like Gondor’s – Rohan’s men right now, BUT THIS IS NOT THAT DAY! TODAY WE… would offer you the hand and the informations that you are going to seek all around the web without the hope to find them logically assembled. Below you will find a short, but complete, walkthrough to compile and deploy your Windows Phone project using Unity 5 (release 5.3.4) according the knowledge we gained over our skin. It will cover some common graphic issues and technical headache as well we encountered during the development.

Hope this will save more headache to our indie collegues! 🙂

 

UNITY 5 WINDOWS PHONE BUILD WALKTHROUGH

This small walkthrough assumes you are aware of the basics of the Unity engine and the basis of visual programming languages. It will cover only the common problems you (will) could have creating a build for your project.

 

  • Download (if you didn’t before) the latest release of Visual Studio (COMMUNITY EDITION) from Microsoft site at this LINK. It’s free but you will have to download and install about 18 to 23 GB of data. It will take some time, even on light speed connections, so, take it easy and launch the download by nightime.
  • Open your project in Unity and swith you target platform to Windows Phone.

Unity platform switch

  • NOTE: Before you switch to Windows Store platform be sure to set the SDK option to UNIVERSAL 8.1 (for Windows Phone 8 version of software, don’t worry it will work on Windows Mobile 10 version as well). You can change it when you will create the build but if you do it now you will have one nuisance less to remember later. The choice is yours.
  • Now you switched to Windows target it’s time to bring some light about Windows Phone app required icons. It can seem as banal as is it is, but it doesn’t. If you take a comparison with iOS / Android icons settings the problem will be under your eyes in a blink: the Windows Phone build requires a nightmarish amount of icon size versions. Making a quick calculation it requires 8 STORE LOGO icons, 20 WINDOWS TILES LOGO icons and 12 WINDOWS PHONE TILES LOGO icons to a total of 40 icons! According to Microsoft the explanation is “easy”: the icons, or tiles as they named them, are stretched or reduced version of base ones to adapt to different Windows devices screensize, resolution and PPI… Yeah, but no!

Unity Windows icon size versions

  • The REALLY REQUIRED icons (to make your icon looking well on almost every device) to deliver your app to the world are quite less, but feel free to create all of them if you have the time or if your artist won’t kill you first! Currently i discourage you to create a Windows 10 mobile app due to really annoying issues relating the SDK and the OS itself (at the time i speak to you), but if you are planning to do it anyway be sure to set all 100% versions of all required icons by type.
  1. STORE LOGO – Scale 100% (50×50) , Scale 240% (120×120)
  2. WINDOWS TILES AND LOGOS – Small Logo: 100% (30×30) ; Medium Tile: 80% (120×120) , 100% (150×150) ; Wide Tile: 100% (310×150) ; Small Tile: 100% (70×70) ; Large Tile: 100% (310×310)
  3. WINDOWS PHONE TILES AND LOGOS – Application Icon: 100% (44×44) , Scale 240% (106×106) ; Small Tile: 100% (71×71) , 240% (170×170) ; Medium Tile: 100% (150×150) , 240% (360×360) ; Wide Tile: 100% (310×150) , 240% (744×360)

NOTE: At this LINK you can find a useful webtool to create in an easy and fast way many of the required squared icons / tiles starting from the original one.

Remember this, Windows uses some “reserved system names” for the icons above, so if you set a custom names for your icons (ex. IconGAME_small1) these names will be converted by Unity at build runtime to adapt to Windows required standard. Keep this in mind because we are going to come back on this argument. If you want to read about Windows Phone design guidelines please take a look at this LINK.

  • Just a further note speaking about SPLASHSCREEN images. If you are a Unity 5 PRO user and you want to set splashscreen images just be aware you need the 100% and 240% versions.Ok, it’s time to build up your project. Let me tell you about our crazy experience with this phase rather than explain what to do. Usually you hit the build button, eventually you receive some error messages in the Unity log, you fix them and build again. Aren’t you? Well, this isnt what happened to us. We hit the build button, the build procedure started and then… Nothing. It stopped at phase 1 (sometimes 2 according the log) giving us an puzzling error. At the start we thought the problem was a Unity bug o something like that, but it was non sense because sometimes it stopped at build phase 1 and sometimes not. Then we thought there was a problem due to fact we keep our project safe on Dropbox and there was something with sync folder that  Unity didn’t like, so we placed our project root folder on a local machine e tried again to build. Nothing. Then, the light… We hit that damn build button something like 30 times, as in sync folder as in local folder as well, and finally IT WORKED! Now, this is the less technical and orthodox explanation ever, but we haven’t nothing more of this: JUST KEEP HIT THE BUILD BUTTON until Unity will accept to do the build.

NOTE: If you need to re-build your project (ex. you forgot to fix a logical error) you will have to struggle with one problem more. There isn’t no explanation (so don’t ask), but you CAN’T build your project to same Windows destination folder twice. You will have to delete the previous one and you will have to create a different named one (this is just a workaround).

  • Let’s say we have our build done, now it’s time to close Unity 5 and go to our build folder. Click on Visual Studio project file and open it up. Unity 5 by default will export a Windows multi-version (PC / Windows Phone) of your project. You can see with your own eyes your projects configurations (grouped as SOLUTION ‘AppName’) on the main screen of Visual Studio project.

Visual Studio - Windows Phone SOLUTION config

  • If you want you can set your Windows Phone version as default one (the name will be bolded like into above image), but this isn’t required. Right click on “Solution” into root menu and choose “Properties”. Double check Windows Phone solution configuration properties to be set on RELEASE (configuration), ARM (platform), DEPLOY (checked). Click on “Apply” and “OK” to exit.
  • Now we’ll check the visual assets configuration to be correct, because you have to know sometimes Unity 5 conversion of app icon names didn’t work very well to result into a partial conversion that will cause some of your icons to be not visible. Right click on your “appname.WindowsPhone (Windows Phone 8.1)” project and choose “Properties”, then on “Packge Manifest” and “Visual Assets” tab.

Visual Studio - Windows Phone VISUAL ASSETS config

  • In this screen you have to check if you icons names were converted correctly to Windows system reserved names. A little advice: check icons type settings one by one. If you encounter a setting without visibile icons (you uploaded before into Unity 5 configuration panel) don’t worry, you will just have to rename the asset path to solve. Here the complete list of system reserved names grouped by type:
  1. SQUARE 71×71 Logo: Assets\SmallTile.png
  2. SQUARE 150×150 Logo: Assets\MediumTile.png
  3. WIDE 310×150 Logo: Assets\WideTile.png
  4. SQUARE 44×44 Logo: Assets\AppIcon.png
  5. STORE LOGO: Assets\StoreLogo.png
  6. BADGE LOGO: Assets\BadgeLogo.png
  7. SPLASH SCREEN: Assets\SplashScreen.png
  • When you finished to check close the configuration tabs. You’re now ready to send your app to the Windows store!

 

THAT’S ALL FOLK!

Hope you liked this small troubleshooting walkthrough about the uncommon Unity 5 and Windows “communication problems” and i hope it will be useful to our other collegues!

Alessandro, out!