Introducing Universal Windows Applications in Unity

August 7, 2014 in 테크놀로지

We are pleased to announce the full support for Windows Phone 8.1 and Universal Windows Applications with the release of Unity 4.5.3. We’ve been working very hard to put our finishing touches on it since its beta program announcement back in April. It is available for download today!

What is it all about?

With the help of Universal Windows Applications, you can now build your Unity game once and target all Windows devices – desktops, laptops, tablets and phones running Windows/Windows Phone 8.1 or higher. On Windows devices, Universal Apps behave identically to Windows 8.1 apps, which Unity has supported since 4.3. On Windows Phone devices, Universal Apps run as Windows Phone 8.1 apps, which is a new feature of Unity 4.5.3.


Figure 1. Universal Applications build window

 

 

What does Windows Phone 8.1 bring to table?

If you worked on Windows Phone 8 and Windows Store games in the past, you know that even though the two platforms are similar, they still have their differences. With Windows Phone 8.1, that changes. There are no longer two separate platforms; they have converged to a single one. To reflect that, building for Windows Phone 8.1 is located under Windows Store platform in our Editor.

Other features of Windows Phone 8.1 player include:

  • Access the full power of .NET 4.5.1 in your C# scripts (Windows Runtime APIs, async/await, etc.);
  • Efficient multithreaded renderer – up to 33% less time per frame (measured on Angry Bots on Nokia Lumia 520 running Windows Phone build 8.10.12359.845);
  • GPU profiling is now available thanks to a new graphics driver for Windows Phone 8.1 (On devices which received the driver update).

Figure 2. GPU profiler running on Windows Phone 8.1

 

 

How do Universal applications work?

Universal app Visual Studio solution

Figure 3. Universal app Visual Studio solution

 

 

So what does the name “Universal” mean? When you press build, Unity will generate a Universal app Visual Studio solution, which will contain 3 projects: ProjectName.Windows, ProjectName.WindowsPhone and ProjectName.Shared (as illustrated in Figure 3).

The shared project, as its name implies, contains all the shared elements: XAML layout, Unity data and asset files.

Target specific projects (ProjectName.Windows and ProjectName.WindowsPhone) contain platform specific files: application manifests, icons, splash screen and tile images. Since Windows 8.1 and Windows Phone 8.1 aren’t binary compatible, each project will also contain their own set of DLLs. Fear not – Unity will automatically make your managed plugins compatible with either target.

When you press the deploy button in Visual Studio, only the necessary files will get copied to the target device (or local machine, if you prefer), thus minimizing the application size which the user would have to download from the Windows Store.

Great, what do I need to get started?

You will need:

  • Unity 4.5.3 or later;
  • Windows 8.1 (any edition);
  • Visual Studio 2013 with Update 2 installed (Express for Windows, Professional, Premium or Ultimate edition).

If you want to test your application on Windows Phone 8.1 emulator (rather than a physical phone), you’ll also need:

  • Windows 8.1 Pro;
  • At least 4 GB RAM;
  • CPU that supports Second Level Address Translation (SLAT) and Data Execution Prevention (DEP).

As always, before updating Unity, backup your project and don’t forget to read the docs:

http://docs.unity3d.com/Manual/WP8-1.html http://docs.unity3d.com/Manual/WindowsUniversalApps.html

Have fun!

Comments (17)

Subscribe to comments
  1. Rashid Thattayil

    August 22, 2014 at 4:35 am /  Reply

    am going try this………… but how to publish universal app

  2. Tautvydas Zilys

    August 18, 2014 at 12:24 am /  Reply

    @MSW: Since WinRT apps don’t use Mono, and instead use the .NET framework which is preinstalled on the devices, we can get away by using Microsoft C# compiler to build scripts. The downside, of course, is that you have to wrap such code in ifdefs, as it won’t work on any Mono platform.

  3. Phil

    August 17, 2014 at 11:48 pm /  Reply

    Glad to see this. Windows Phone so often winds up without a version of some of the best apps.

  4. MSW

    August 17, 2014 at 9:35 pm /  Reply

    How does the access from .NET 4.5 to Unity MonoBehaviours work? And can it be modified to somehow allow .NET 4.5 on regular Windows standalone apps?

  5. MSW

    August 17, 2014 at 9:35 pm /  Reply

    How does the access from .NET 4.5 to Unity MonoBehaviours work? And can it be modified to somehow allow .NET 4.5 on regular Windows standalone apps?

  6. Victoria

    August 13, 2014 at 3:44 pm /  Reply

    Great news! Finally Unity is avaliable for Windows phones! Will now try it out

  7. hemodroid

    August 13, 2014 at 12:49 pm /  Reply

    @Tautvydas

    After uninstalling and reinstalling now it works.
    Thx for your help

  8. Tautvydas Zilys

    August 13, 2014 at 12:02 pm /  Reply

    And which exact VS version do you have? This info can be found in Help -> About window.

  9. hemodroid

    August 13, 2014 at 11:41 am /  Reply

    @Tautvydas

    L’application sur laquelle est basé ce type de projet est introuvable. Pour plus d’informations, utilisez le lien suivant : http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=76F1466A-8B6D-4E39-A767-685A06062A39

    Translated:

    The application on which this project is based was not found. For more information, use the link below http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=76F1466A-8B6D-4E39-A767-685A06062A39

  10. Jes

    August 13, 2014 at 9:01 am /  Reply

    Access the full power of .NET 4.5.1 in your C# scripts (Windows Runtime APIs, async/await, etc.);

    Add access to .Net 4.5.1 features for Linux and Mac standalone builds

  11. Tautvydas Zilys

    August 13, 2014 at 7:06 am /  Reply

    @Hemodroid: I’m running Update 3 myself on all of my machines – I haven’t experienced such problems. What kind of errors are you getting? Did you try to delete the generated VS solution instead of building on top of it? What exact VS version do you have?

  12. hemodroid

    August 13, 2014 at 4:27 am /  Reply

    Because of errors when running the certification test kit i upgraded to the latest VS version wich is unfortunatly the update 3 and incompatible with the project type generated by Unity :/

  13. Tautvydas Zilys

    August 12, 2014 at 8:35 pm /  Reply

    @Zainab Al-Ansari: Windows Phone 8 is definitely supported – we have supported it for over a year now.

    @CAYL:

    VS produces two .appx packages – one for Windows and one for Windows Phone. You upload both to the Windows Store.

    As for the SDK – Visual Studio 2013 with Update 2 has WP 8.1 SDK included, so if you install that, you’re set.

  14. CAYL

    August 12, 2014 at 8:14 pm /  Reply

    Finally!, couple of questions:
    -Do we need only one archive built in VS (xap or whatever) or we need to build both the windows solution and the phone solution?
    -What about the windows phone sdk requirements?

  15. Zainab Al-Ansari

    August 12, 2014 at 8:04 pm /  Reply

    what about Windows Phone 8? does Unity support it?

  16. Luchianno

    August 12, 2014 at 7:41 pm /  Reply

    *Comment containing “BRING BACK XNA YOU BATSARDS!”*

  17. chall3ng3r

    August 12, 2014 at 6:26 pm /  Reply

    AWESOME!!!

Leave a reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>