Unity 6 updates for platforms

Hi all,

My name is James, and I am a Product Director within Unity’s platforms team. Our team’s focus is not just on ensuring that we continue to extend Unity’s platform reach as far as possible, but also on providing the features, tools, stability and performance for you to take your games anywhere you want.

I’m excited to share all the amazing updates coming to Unity 6 that provide better experiences for platforms. These include a newly optimized runtime for mobile browsers as well as key advances in multiplatform development.

Expand mobile gaming reach with web runtimes

Android and iOS browser support has arrived With Unity 6. Now, you can run your Unity games anywhere on the web without limiting your browser games to desktop platforms. Additionally, you can embed your games in a WebView in a native app or use our progressive web app template to make your game behave more like a native app, with its own shortcut and offline functionality. With more bells and whistles such as mobile device compass support and GPS location tracking, your web games will be able to react to wherever your gamers choose to play.

Fine-tune your web games with an update to the Emscripten 3.1.38 toolchain and the latest support for WebAssembly 2023, our collection of newer WebAssembly language features such as sign-ext opcodes, non-trapping fp-to-int, bulk-memory, BigInt, Wasm table, native Wasm exceptions, and Wasm SIMD. WebAssembly 2023 also supports up to 4GB of heap memory, unlocking access to even more RAM for you to use on the newest hardware.

To see how studios are already leveraging Unity Web to create amazing multiplatform games, watch the webinar Growing your web game’s playerbase roundtable. An expert from ULTRAHORSE will give you an inside look into his web game design and development experience, and an expert from Xsolla provides valuable monetization tips.

Caption: This webinar features insights from both the studio and monetization platform’s point of view.

Early access to the WebGPU backend

The introduction of experimental support for a WebGPU backend marks a significant milestone for web-based graphics acceleration, paving the way for future leaps coming to graphics rendering fidelity for Unity web games.

WebGPU is designed with the goal of harnessing and exposing modern GPU capabilities, such as Compute Shader support, to the web. This new web API will achieve this by providing a modern graphics acceleration interface that’s implemented internally via native GPU APIs such as DirectX 12, Vulkan, or Metal, depending on the desktop device you use.

The WebGPU graphics backend is still in experimental state, so we do not recommend using it for production. Can’t wait? Discover how to gain early access and test WebGPU in our graphics forum.

For a deep dive into the latest Unity Web features, watch our Unity 2024 speaking session: Better in a browser: Big advances for gaming with Unity Web. It includes best practices for setting up web games in Unity 6 – including time-saving and optimization tips – and how to reach browser audiences without being blocked by hardware requirements or mobile marketplaces. Plus, Josh Loveridge from Stratton Studio will give you a sneak peek at the future of web graphics with their latest WebGPU project.

Quality-of-life improvements to the Unity build window, plus all-new build profiles

With the new Build Profiles feature, managing builds will be more efficient, with a higher degree of flexibility than ever before.

As well as configuring build settings in each profile, you can now include different scene lists to customize the content of your builds, creating multiple unique, playable demos for your game with the scenes you want to share most.

Additionally, you can set custom scripting defines for any profile, which are additive over those found in player settings, to allow for fine-tuning of features and behavior of both builds and Editor Play mode. This could be used to create vertical slices or target different behavior for different platforms.

You can add an override for player settings to any profile, allowing you to customize settings that relate to the platform module. This feature makes it easier to configure publishing settings for different profiles. Overall, this new feature reduces the need to rely on custom build scripts to customize the way that builds are managed in the Editor.

Finally, we also added the Platform Browser to enhance platform discovery inside the Editor. The platform browser is a place where you can discover all the platforms that Unity supports and create build profiles for any you choose.

To see these features in action, watch the Unity 2024 speaking session: Everything you need to know about Build Profiles in Unity 6. In this video, you’ll learn the key Build Profiles workflows for creating and sharing profiles with your team, improving iteration time, and unlocking new build possibilities that previously required custom scripting.

Unlock the Microsoft platform ecosystem with the Microsoft GDK packages

Thanks to the ongoing partnership between Microsoft and Unity, two new Microsoft GDK packages are now available with Unity 6, 2022 LTS, and 2021 LTS. The Microsoft GDK Tools and Microsoft GDK API packages can be used for Microsoft gaming platforms with the same configuration and code base. These packages make it easier than ever to build for Microsoft gaming platforms like Windows and Xbox using the same code to utilize Xbox Network services like user identity, player data, social, cloud storage and more.

The combined Microsoft GDK packages allow you to make games for Microsoft platforms with a shared code base and the ability to automate the build process through APIs. Additionally, new samples are provided to showcase various features available in the packages.

Previously when targeting Xbox consoles and the Microsoft Store on Windows, guidance was to install separate GDK packages provided by Microsoft and Unity. This required the maintenance of a different branch of code for different Microsoft platform targets. Using the new Microsoft GDK packages, this is no longer the case. Also, it will now be possible to modify the MicrosoftGame.config file from an API directly in the build server. Combined with the new build profiles features in Unity 6, bringing your games to the Microsoft gaming ecosystem from a single project has never been easier.

If you’ve been using the legacy Game Core Package or the GDK Unity package and want to migrate to these new Microsoft GDK packages (the Microsoft GDK API and Microsoft GDK Tools), follow the instructions detailed in this migration guide.

For a deep dive into the Microsoft GDK pages, watch the Unity 2024 speaking session: Xbox and more: Unlock the latest for Microsoft gaming platforms. In this talk, Unity gives you a walk-through of the latest development best practices for PC and Xbox, optimization tips and tricks, and how to take advantage of the wider Microsoft gaming platforms with the new Microsoft GDK packages in Unity 6.

DirectX 12 backend improvements

Unity’s DirectX 12 graphics backend is fully production ready, and available for use when targeting DX12-capable Windows platforms. This change is preceded by a comprehensive array of improvements to both rendering stability and performance.

Using DX12, Unity Editors and Players can benefit from significant improvements to CPU performance by using Split Graphics Jobs. Performance gains are expected to scale based on scene complexity and the amount of draw calls submitted.

Most noticeably, the DX12 graphics API unlocks support for a wide range of modern GPU capabilities in order to enable the next generation of graphics rendering, via features such as DirectX Ray Tracing and Asynchronous Compute. Upcoming versions will unlock additional DX12 capabilities , ranging from graphics to machine learning, to enable an unprecedented level of fidelity and performance.

For more information about the graphics improvements coming to Unity 6, check out this Discussions post by my colleague Mathieu Muller.

XR experiences

Unity continues to support development of XR experiences on headsets like Meta Quest, Apple Vision Pro, Playstation VR, as well as handheld mobile devices (ARCore, ARKit). In Unity 6, you’ll find access to new cutting-edge features across supported platforms, with updates to our tools that keep your development workflows streamlined.

Bringing the physical world into your game

Whether you want to incorporate mixed reality into your existing app or you’re making something entirely new, AR Foundation helps you incorporate the physical world into players’ experience in a cross-platform way. In Unity 6, we’ve expanded support for meshing, occlusion, bounding boxes and persistent anchors to additional platforms like Meta Quest, visionOS and ARCore.

Access to these features for Meta Quest can be found through OpenXR, enabling you to save and load anchors across sessions, identify physical objects in your environment, and access a global mesh of the environment. We’ve also added Vulkan support in ARCore and enhanced it for Meta Quest, so that players have smoother, more performant visuals.

XR input and interactions

To help you streamline your interactions, we’ve added a couple of major improvements to XR Interaction Toolkit 3.0 (XRI). This includes a new interactor called the Near-Far Interactor, enabling greater flexibility and modularity when customizing how interactors behave in your projects.

We’ve also improved how we handle input in XRI with the addition of our new Input Readers, which streamlines the input process and reduces code complexity across various types of input. Lastly, we created a new virtual keyboard sample, giving you the ability to build and customize in-game keyboards in a cross-platform way.

Unique hand gestures

More platforms now support the use of hands to interact with content. Our XR Hands package enables you to implement custom hand gestures (such as thumbs up, thumbs down, pointing), as well as common OpenXR hand gestures. It includes samples to help you get started quickly. We’ve also included tools for creating, fine-tuning, and debugging your hand shapes and gestures so that your content is accessible to more people.

Improved visual fidelity

Unity 6 includes support for composition layers, a game-changer for XR. Composition layers significantly reduces artifacts, delivering clearer text, sharper outlines, and an overall better appearance. Layers are designed to significantly improve the visual quality of your XR experiences by enhancing the rendering of graphics, in particular text, images, videos and UI elements. We’ve also included interactive UI components, helping you convert existing UI.

Support for visionOS 2

Unity 6 includes support for the recent release of visionOS 2, making it easier than ever to migrate existing XR experiences to Apple Vision Pro with passthrough support for Metal-based apps. There’s a swathe of additional features that significantly improves the development experience, including resizable volumes, customizable hover effects, and dynamic lights and shadows for greater immersion and realism across mixed reality experiences.

Unity 6 also includes new features for visionOS development beyond support for visionOS 2. Stereo render targets, multi-volume support, and mode switching help you unlock more sophisticated levels of immersion. We have also delivered rendering improvements across shaders, particles, graphics effects, and blendshapes to help you achieve your visual aspirations, especially when relying on custom shaders and graphics effects.

To learn more about the latest enhancements for XR development in Unity 6, watch the Unity 2024 speaking session Immersive experiences: Building cross-platform mixed reality. This has been an incredible year for XR, featuring new devices and spatial capabilities. Learn about Unity’s latest cross-platform development tools in Unity 6 that empower you to innovate and build immersive experiences across leading XR platforms.

Maximize mobile gaming experiences

Improve gaming experiences on Android with a host of new features and capabilities introduced to the platform in Unity 6. Organize your assets and reduce initial download sizes with the new Addressables for Android package with Play Asset Delivery and Texture Compression Format Targeting support. Make sure that your game always looks fantastic on all screens and dimensions with improved support for large screens and foldables, and C# APIs to understand device configuration changes in real time.

Additional mobile improvements coming with Unity 6 include the latest Android tooling and support for Java 17 out of the box, as well as the ability to include debug symbols within your Android App Bundle. This will save you time when submitting to the Google Play Store and ensure you always have stacktrace information in the Play Console.

Stay on top of issues and stability monitoring by leveraging support for Application Exit Information through C#, and a new capability to automatically include debug symbols within your Android App Bundle for submissions to the Google Play Store. Utilize Game Activity Jetpack library to introduce enhanced threading support and updatability from the Android Game Development Toolkit (AGDK). And on the tooling side of things, enjoy out-of-the-box Gradle 8 & JDK17 support.

For a deep dive into our latest mobile features, watch the Unity 2024 speaking session: Best practices for reducing ANRs on Android. In this video, you’ll learn how Application Not Responding (ANRs) occur and what their impact is. We’ll show you how to identify and eliminate risky areas in your Unity code that may cause them. Plus, we’ll give you a walkthrough of new Unity 6 features that can boost stability and best practices for monitoring the technical performance of your live game.

Unity Editor support for Arm-based Windows devices

Unity delivered support for Arm-based Windows devices in 2023.1, enabling you to bring your titles to new hardware. With Unity 6 we are now delivering native Unity Editor support for Arm-based Windows devices. This means you can now take advantage of the performance and flexibility that Arm-powered devices can offer to create your Unity games.

Learn more about Unity runtime support for Arm on the Unity Blog, and for more details on native Unity Editor support on Arm-based devices, tune into the Microsoft Build 2024 speaking session: Introducing the Next Generation of Windows on Arm | BRK249. In this session, learn about the exciting new experiences for Arm-powered Windows this year, such as intelligent Windows apps that leverage rich capabilities of the NPU. Get the inside scoop on what Microsoft and Unity have been doing for developers with runtimes, tooling and infrastructure for Arm.

So, as you can see, there are a lot of new platform features to be excited about in Unity 6, but that’s just the start! Stay tuned for even more exciting features coming soon.

From the platforms team, thank you all, I’m looking forward to seeing how you utilize these new developments, and we are always eager to hear about your experiences. Please share your thoughts and feedback in our dedicated platforms section in the discussion forums; we’d love to hear from you.

Many thanks,

James Stone.

7 Likes

Hi @jamess_unity ,

As shown in the roadmap for Unity 6 at Unite: https://youtu.be/pq3QokizOTQ?t=692 there’s a planned WASM stripping tool. That said, it was unclear if it was already available for Unity 6 or if its planned for Unity 6.1+.

Mostly hoping that it was going to be available for the Web platform outside of Facebook instant games.

Thanks!

Hey @KamilCSPS The tool is planned for release later in the Unity 6 timeline, the team is head down finding as many areas as possible that we can strip, so keep an eye out for more details later.

Thanks for the quick reply. Can you confirm if the tool will be available for the at-large Web platform or will it be exclusive for Facebook Instant games?

This is great news for web.

I am wondering though what specifically has changed to allow on mobile now? As it was partly just the js wrapper not allowing it by default though it could run on many phones ok.

Also 4gb on desktop is great but the limit on mobile might very well be very small still?

@KamilCSPS The initial use case for the tool was to enable instant games, we are however already starting to investigate the feasibility of extending this tech beyond instant games :+1:t5:

3 Likes

Hi. Will official support super lightweight web mobile to support low end mobile devices just like cocos creator? From what I know previously it’s the mission of project tiny. Is that official going to bring it back to roadmap again? Currently entities graphics does not WebGL platform is huge pain that needs to solve first.

@andyz Its really just been work under the hood to get mobile web to a point where we can fully support it, such as automated test suites and other Unity specific things we need internally. In Unity 6, we did add some missing features, such as compass API and geo location, which are not in 2022.

As for memory, the new 4GB support is definitely more useful for projects targeting desktop. The browsers on mobile devices only have access to lower memory limits, and the you need to test your project on the devices you are looking to target. We have included tools (Web Diagnostics Overlay) to make it easy to see how much memory the game is using in the browser.

1 Like

@jamess_unity , an ol’coleague of yours (Aras!) has posted a very interesting writeup of the Web Platform build sizes. As you know, this is a major pain point for the platform - as it directly correlates to the time-to-play in games.

Here’s the post: Unity 6 "empty" web build file sizes · GitHub

There’s quite a bit of low-hanging fruits that can be done easily to lower it.

I just wanted to point it out and ensure it gets the right attention. Thanks!

2 Likes

Can Unity not report the post-compression size of data in the builds by size instead or as well as the pre-compression size as it does now?
Because on web the image sizes in particular have proved a red herring in terms of build size.

1 Like

@kamilCSPS Thank you for the heads up, I will raise this with the web team directly for review

Did this actually happen? There’s no documentation on these new APIs anywhere, and it doesn’t seem to be part of Input System 1.11.2. Was it done via some kind of backward-compatibility hack in Unity 6 instead of a new API in the Input System? And if so, are there any plans to have it backported to 2022?

EDIT: Installed the latest version of Unity 6 to check it out and couldn’t find it. There’s no compass API and Input.compass still returns 0 heading on android just as before, nothing’s changed. What am I missing?

1 Like

What about microphone? Are there any plan to actually support microphone in web?

The document still explicitly state Not supported

1 Like

I have been unable to even build for Android with 6000. I selected all of the android options at install time. Yet when I build I get various build version errors in the console. I am using the Android/Java/NDK that 6000 installs. I can’t find any build version that works. I can’t be the first to try.

Can you please provide some information about why there’s no UI scaling for Unity 6 on macOS? It’s inconvenient to manually change the screen resolution every time. We need native UI scaling. At least some explanation would be better than none, Unity.

Hello, hello, since we are talking about platforms here and once we touched on the topic of the build size for the Web, please note that the assembly includes a bunch of debugging prefabs, XR shaders, PixelPerfectCamera and other things that are not used in the project, but add weight to the assembly. According to calculations, there is 0.5 MB extra (talk about URP)

2 Likes