Mobile game and XR development with Unity 2019.1

Thursday 7/18/19 02:00pm
|
Posted By Leilani DeLeon
  • Up0
  • Down0

If you are a game developer, you probably know that Unity, one of the most widely used real-time 3D environment creation systems, provides developers and artists with world-class tools and workflows.

Today, over 50% of all new mobile games are created in Unity. You might not know that Unity also powers more than 60% of XR experiences – encompassing virtual reality (VR), augmented reality (AR), and mixed reality (MR) – on a broad range of devices, many of which are powered with the Qualcomm® Snapdragon™ Mobile Platform, such as the Oculus Quest and the HoloLens 2.

Together, Unity and Qualcomm Technologies, Inc. are leaders in the XR industry in the tools and technologies used on the current generation of XR headsets, and we’re collaborating to ensure that both mobile game and XR developers using Unity get optimal performance from our platforms.

Unity has invested in optimizing and increasing performance geared towards new powerful processors like our Snapdragon 8 series mobile platform, which supports premium mobile experiences like Qualcomm® Snapdragon Elite Gaming™ and XR experiences.

The latest release of Unity, Unity 2019.1, contains a number of significant changes and new features that will enhance the development and performance of mobile games and XR experiences, including those powered by Snapdragon mobile platforms. Let’s take a closer look at some of these new features and what they mean for developers.

A Data-Oriented Technology Stack

Unity is shifting from object-oriented design to data-oriented design, in which game object behaviors are separate from the data on which they operate. This philosophy has led to the creation of a new programming language called the Entity Component System (ECS). ECS, derived from C# (the standard language used in Unity), is a high-performance multithreaded system that makes it possible to take advantage of multi-core processors without the heavy programming headache.

This all comes together through Unity’s Data-Oriented Technology Stack, which is a combination of the Entity Component System, the C# Job System, and the latest release’s new Burst Compiler. The Burst Compiler is a new low-level virtual machine (LLVM)-based backend compiler technology that takes C# jobs and produces highly optimized machine code. These code optimizations mitigate some of the overhead of higher-level languages like C#, which give it a level of performance much closer to that of lower-level languages like C++.

Updates to the Scriptable Render Pipeline

Unity’s next-level rendering technologies provide the potential for beautiful visuals regardless of the build target.

Lightweight Render Pipeline (LWRP), geared towards mobile and VR games, gives developers the flexibility to create beautiful graphics while optimizing for battery life and performance. The goal of LWRP is to provide optimized real-time performance on constrained platforms by making some trade-offs to lighting and shading. LWRP can be used by developers for a broad range of mobile platforms, VR devices, and games with limited real-time lighting needs. The LWRP performs single-pass forward rendering, with one real-time shadow light and light culling per object, allowing for all light sources to be shaded in a single pass.

You can see the full effect of LWRP in Unity’s Megacity demo, which is a massive cityscape comprising more than 4.5M mesh renders, 200K unique objects per building, 100K individual audio sources, and 5K dynamic vehicles – all rendered in real-time in Unity at 60 fps.

Vulkan API support

Unity 2019.1 now has native rendering plugin support for Vulkan. Vulkan is a new-generation 3D graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs in both PCs and on mobile platforms. The main benefit of Vulkan over older mobile rendering APIs, such as OpenGL ES 3.x, is speed. Vulkan is designed to take advantage of multiple CPU cores by allowing the application to build command lists in multiple threads in parallel. This allows the application to take advantage of the CPU cores on the device to help improve performance.

The addition of native rendering plugin support for Vulkan in Unity 2019.1 is great news, since Vulkan is supported on Qualcomm® Adreno™ 5xx and 6xx series GPUs. Snapdragon developers can use the Adreno GPU SDK for rendering operations that support Vulkan. Developers can use Unity’s default Auto Graphics API, which is Vulkan-enabled starting with version 2019.1. This means that if the build target/underlying hardware supports Vulkan, then Vulkan will be selected as the rendering API; OpenGL will be used in all other cases. Prior to Unity 2019.1, OpenGL was the default rendering API, and Vulkan support had to be manually enabled.

For an additional overview of Vulkan on Adreno, check out Developing 3D Graphics with Vulkan on Mobile.

Get started on your next mobile or XR project with Unity and Snapdragon

Using Unity on mobile and XR devices powered by Snapdragon allows developers to create once and publish to many different devices while providing consistent experiences and high-quality graphics across build targets.

Get started by downloading the Unity Editor and checking out our Snapdragon development kits, such as the Snapdragon 855 Mobile Hardware Development Kit. You can also visit the Unity Learn portal for great resources on building experiences in Unity, regardless of your skill level.

Qualcomm Snapdragon, Qualcomm Snapdragon Elite Gaming and Qualcomm Adreno are products of Qualcomm Technologies, Inc. and/or its subsidiaries.