Version: 2019.2
Universal Windows Platform: WinRT API in C# scripts
Universal Windows Platform: IL2CPP scripting back end

Universal Windows Player settings

This page details the Player settings specific to the Universal Windows platform. For a description of the general Player settings, see Player Settings.

Player settings for the Universal Windows platform
Player settings for the Universal Windows platform

You can find documentation for the properties in the following sections:

Icon

Use the Icon settings to customize the branding for your app on the Windows Store.

Icon Settings for the Universal Windows Platform Player
Icon Settings for the Universal Windows Platform Player

Expand the Store Logo section to specify the image that appears on the Store description page for the application. You can add up to eight different resolutions.

Tile section

Customize the general appearance of your Windows Store tiles with these settings:

Setting Функция:
Short name Set an abbreviated name for the app.
Show name on Indicate each icon image you want the name to appear on: Medium Tile, Large Tile, or Wide Tile.
Foreground text Choose whether you want to use Light or Dark text on the app’s Tile.
Background color Specify what color you want to use for the background.
Default Size Choose what size you want to use as the default size for the Tile.
Not Set Don’t use a default size.
Medium Use a medium size.
Wide Use a wide size.

Unity copies these options directly to the Package.appxmanifest file.

Tiles and Logos section

Specify the images your tiles display on the Windows Store with these settings:

Setting Функция:
Square 44x44 Logo Set a 44x44 logo image to use on the app’s tile. You can set up to 10 resolutions.
Square 71x71 Logo Set a 71x71 logo image to use on the app’s tile. You can set up to 5 resolutions.
Square 150x150 Logo Set a 150x150 logo image to use on the app’s tile. You can set up to 5 resolutions.
Square 310x310 Logo Set a 310x310 logo image to use on the app’s tile. You can set up to 5 resolutions.
Wide 310x150 Logo Set a 310x150 logo image to use on the app’s tile. You can set up to 5 resolutions.

Resolution and Presentation

Use the Resolution and Presentation section to customize aspects of the screen’s appearance.

Resolution and Presentation settings for the Universal Windows platform
Resolution and Presentation settings for the Universal Windows platform
Setting Функция:
Default is Fullscreen Set the window to the full-screen native resolution of the display. Unity renders app content at the resolution set by script (or by user selection when the built application launches), but scales it to fill the window. When scaling, Unity adds black bars to the rendered output to match the aspect ratio chosen in the Player settings, so that the content isn’t stretched. This process is called letterboxing.
Run In background Enable this option to make the game keep running (rather than pausing) if the app loses focus.
Transparent Swapchain Sets AlphaMode on the swap chain to DXGI_ALPHA_MODE_PREMULTIPLIED.
This setting is only used for UWP projects that use the XAML build type. By enabling this setting, you can compose Unity content with other XAML content in your application. For more information, see the PlayerSettings.WSA.transparentSwapchain.

Orientation

Choose the game’s screen orientation from the Default Orientation drop-down menu:

Setting Функция:
Portrait Orient the screen so that the device’s Home button appears at the bottom.
Portrait Upside Down Orient the screen so that the device’s Home button appears at the top.
Landscape Left Orient the screen so that the device’s Home button appears on the right side.
Landscape Right Orient the screen so that the device’s Home button appears on the left side.
Auto Rotation Screen orientation changes with device orientation. This is the default.

When you set the orientation to Auto Rotation, the Allowed Orientations for Auto Rotation section appears.

Allowed Orientations for Auto Rotation

This section is only visible when Default Orientation is set to Auto Rotation.

Because Auto Rotation changes screen orientation to match the device, you may want to limit the screen orientations allowed (for example, locking a device to landscape).

Enable each orientation you want to allow by checking its box in this section:

Setting Функция:
Portrait Allow portrait orientation.
Portrait Upside Down Allow portrait upside-down orientation.
Landscape Right Allow landscape right orientation (home button on the left side).
Landscape Left Allow landscape left orientation (home button is on the right side).

Splash Image

Above the common Splash Screen settings, the Player Settings settings allow you to specify splash images for the Universal Windows platform.

Splash settings for the Universal Windows platform
Splash settings for the Universal Windows platform

Use the Virtual Reality Splash Image property to select a custom splash image to be displayed in Virtual Reality displays.

Below the common Splash Screen settings, there are a few additional sections:

Windows

Set the foreground image you want to use in your app’s splash screen. You can add up to seven different resolutions.

Windows Splash settings for the Universal Windows platform
Windows Splash settings for the Universal Windows platform

Windows Holographic

Use these settings to customize the holographic splash image for Mixed Reality apps.

Windows Holographic Splash Settings for the Universal Windows Platform Player
Windows Holographic Splash Settings for the Universal Windows Platform Player

Set a Holographic Splash Image to appear during startup. This image appears for five seconds (or until the app finishes loading).

Tracking Loss

A Mixed Reality headset needs to build world-locked coordinate systems from its environment, in order to allow holograms to stay in position. Tracking loss occurs when the headset loses track of where it is (can’t locate itself) in the world. This leads to a breakdown in spatial systems (spatial mapping, spatial anchors, spatial stages).

When this happens, Unity stops rendering holograms, pauses the game, and displays a notification. You can customize the notification image that appears by enabling the On Tracking Loss Pause and Show Image property, and then selecting the image to display with the Tracking Loss Image property.

For more information, see Recommended settings for Unity.

Overwrite background color

The common Splash Screen settings allow you to set the Background Color for when no background image is set, which applies to all platforms.

Overwrite background color Splash Settings for the Universal Windows Platform Player
Overwrite background color Splash Settings for the Universal Windows Platform Player

To override this for the Universal Windows platform, you can enable the Overwrite background color property and then use the Background color setting to choose a different color.

Other Settings

This section allows you to customize a range of options organized into the following groups:

Rendering

Use these settings to customize how Unity renders your game for the Univeral Windows platform.

Other Rendering settings for the Universal Windows Platform player
Other Rendering settings for the Universal Windows Platform player
Setting Функция:
Color Space Choose which color space should be used for rendering: Gamma or Linear.
See the Linear rendering overview for an explanation of the difference between the two.
Auto Graphics API Disable this option to manually pick and reorder the graphics APIs. By default this option is enabled, and Unity uses Direct3D11.
Строка состояния Enable this option to use Static batching.
Dynamic Batching Enable this option to use Dynamic Batching (activated by default).
GPU Skinning Enable this option to use DX11/ES3 GPU skinning.
Graphics Jobs (Experimental) Enable this option to instruct Unity to offload graphics tasks (render loops) to worker threads running on other CPU cores. This is intended to reduce the time spent in Camera.Render on the main thread, which is often a bottleneck.
Note: This feature is experimental. It may not deliver a performance improvement for your project, and may introduce new crashes.
Lightmap Streaming Enabled Enable this option to load only the lightmap mip maps as needed to render the current game Cameras. This value applies to the lightmap textures as they are generated.
Note: To use this setting, you must enable the Texture Streaming Quality setting.
Streaming Priority Set the lightmap mip map streaming priority to resolve resource conflicts. These values are applied to the light map textures as they are generated.
Positive numbers give higher priority. Valid values range from –128 to 127.

Configuration

Other Configuration settings for the Universal Windows platform
Other Configuration settings for the Universal Windows platform
Setting Функция:
Scripting Backend The scripting backend used by the build.
IL2CPP Unity’s .NET runtime. This is the only option available for Universal Windows Platform.
API Compatibility Level There are two options for API compatibility level: .NET 4.0, or .NET Standard 2.0.
Tip: If you are having problems with a third-party assembly, you can try the suggestion in the API Compatibility Level section below.
C++ Compiler Configuration Choose the C++ compiler configuration used when compiling IL2CPP generated code.
Note: This property is disabled for the Universal Windows platform because it is chosen in generated Visual Studio project.
Use incremental GC Use the incremental garbage collector, which spreads garbage collection over several frames to reduce gc-related spikes in frame duration.
Accelerometer Frequency Define how often to sample the accelerometer. If you choose Disabled, then no samples are taken. Otherwise, you can choose from 15Hz, 30Hz, 60Hz and 100Hz frequencies.
Disable HW Statistics Enable this option to instruct the application not to send information about the hardware to Unity. For more details, see Unity Hardware Statistics.
Scripting Define Symbols Set custom compilation flags. For more details, see Platform dependent compilation.
Allow ‘unsafe’ Code Enable support for compiling ‘unsafe’ C# code in a pre-defined assembly (for example, Assembly-CSharp.dll).
For Assembly Definition Files (.asmdef), click on one of your .asmdef files and enable the option in the Inspector window that appears.
Active Input Handling Choose how you want to handle input from users.
Input Manager Use the traditional Input settings.
Input System (Preview) Use the Input system. The Input System is provided as a preview package for this release. To try a preview of the Input System, install the InputSystem package.
Both Use both systems side by side.

API Compatibility Level

You can choose your mono API compatibility level for all targets. Sometimes a 3rd-party .NET library uses functionality that is outside of your .NET compatibility level. In order to understand what is going on in such cases, and how to best fix it, try following these suggestions:

  1. Install Reflector for Windows.
  2. Drag the .NET assemblies for the API compatilibity level you are having issues with into Reflector. You can find these under Frameworks/Mono/lib/mono/YOURSUBSET/.
  3. Drag in your 3rd-party assembly.
  4. Right-click your 3rd-party assembly and select Analyze.
  5. In the analysis report, inspect the Depends on section. The report highlights anything that the 3rd-party assembly depends on, but that is not available in the .NET compatibility level of your choice in red.

Optimization

Other Optimization Settings for the Universal Windows Platform Player
Other Optimization Settings for the Universal Windows Platform Player
Setting Функция:
Prebake Collision Meshes Enable this option to add collision data to Meshes at build time.
Keep Loaded Shaders Alive Enable this option to prevent shaders from being unloaded.
Preloaded Assets Set an array of Assets for the player to load on startup.
To add new Assets, increase the value of the Size property and then set a reference to the Asset to load in the new Element box that appears.
Strip Engine Code Enable code stripping. This setting is only available with the IL2CPP Scripting Backend.
Most games don’t use all necessary DLLs. With the Strip Engine Code option enabled, you can strip out unused parts to reduce the size of the built player on iOS devices. If your game is using classes that would normally be stripped out by the option you currently have selected, you’ll be presented with a Debug message when you make a build.
Managed Stripping Level Choose how aggressively Unity strips unused managed (C#) code.
Normal Remove unreachable managed code to reduce build size and .NET/IL2CPP build times.
Aggressive Run UnityLinker in a less conservative mode than normal, reducing code size even further than what Normal can achieve. However, this additional reduction may come with tradeoffs. For more information, see ManagedStrippingLevel.
Vertex Compression Set vertex compression per channel. For example, you can enable compression for everything except positions and lightmap UVs. Whole Mesh compression set per imported object overrides where vertex compression is set on objects. Everything else obeys these vertex compression settings.
Optimize Mesh Data Enable this option to remove any data from Meshes that is not required by the Material applied to them (such as tangents, normals, colors, and UVs).

Logging

Select what type of logging to allow in specific contexts.

Other Logging settings for the Universal Windows platform
Other Logging settings for the Universal Windows platform

Check one box that corresponds to each Log Type (Error, Assert, Warning, Log, and Exception) when running scripts (ScriptOnly) , all the time (Full), or never (None).

Legacy

Enable the Clamp BlendShapes (Deprecated) option to clamp the range of blend shape weights in SkinnedMeshRenderers.

Other Legacy settings for the Universal Windows platform
Other Legacy settings for the Universal Windows platform

Publishing Settings

Use these settings to customize building your Universal Windows app. These options are organized into the following groups:

Unity stores these settings in the Package.appxmanifest file when creating a Visual Studio solution for the first time.

Note: If you build your project on top of the existing one, Unity doesn’t overwrite the Package.appxmanifest file if it’s already present. That means if you change any of the Player settings, you need to check Package.appxmanifest. If you want to regenerate Package.appxmanifest, delete it and rebuild your project from Unity.

For more information, see Microsoft’s documentation on App package manifest.

Supported orientations from Player Settings are also populated to the manifest (Package.appxmanifest file in Visual Studio solution). On Universal Windows Apps, Unity resets the orientation to the one you used in the Player settings, regardless of what you specify in the manifest. This is because Windows itself ignores those settings on desktop and tablet computers.

Tip: You can always change supported orientations using Unity scripting API.

Packaging

Packaging Publishing settings for the Universal Windows platform
Packaging Publishing settings for the Universal Windows platform
Setting Функция:
Package name Enter the name to identify the package on the system. The name must be unique.
Package display name The Product Name value that you set at the top of the Player settings appears here. This is the name of the app as it will appear on the Windows Store.
Version Enter the version for the package using a string in quad notation: Major.Minor.Build.Revision.
Publisher display name The Company Name value that you set at the top of the Player settings appears here. This is the user-friendly name of the publisher.
Streaming Install Enable this option to create a AppxContentGroupMap.xml manifest file containing streamable Assets for the Scene. To include Scene Assets by default, use the Last required scene index setting. Assets in Scenes with a scene index above the Last required scene index are specified as streamable in the manifest file.
Last required scene index Enter the index number from the Scenes In Build list on the Build Settings window that corresponds to the last scene in that list that must be present in the game build. For an application to start, Unity requires any scene index at or less than the specified index. To require all files in the list, use the index of the last scene in the list.
Scenes with a greater scene index must include shared Assets for Scenes with a lesser index. The order of scenes in the Build Settings dialog may be important to allow the application to locate the required assets.
Note: By default, the Streaming Install option is disabled, which means that this setting is not available. To make this property editable, enable the Streaming Install option first.

Certificate

Every Universal Windows App needs a certificate which identifies a developer.

Before creating the certificate
Before creating the certificate

You can click the Select button to choose your certificate file (.pfx) from your local computer. The name of the file you selected appears on the Select button.

If you don’t have a certificate file already, you can generate a file in Unity:

  1. Click the Create button. The Create Test Certificate for Windows Store dialog window appears.

  2. Enter the name of the package publisher in the Publisher text box.

  3. Enter the password for the certificate in the Password text box and then again in the Confirm password text box.

  4. Click the Create button.

    The window closes and the Certificate section displays the name you entered for both the Publisher and Issued by values. The Expiration date is set to one year from the time you created the certificate.

After creating the certificate
After creating the certificate

Streaming Install

If you enable Streaming Install, Unity generates an AppxContentGroupMap.xml file containing streamable Assets. To include Scene Assets in the AppxContentGroupMap.xml file by default, use the Last required scene index setting, which uses the scene index in the Build Settings dialog. Assets in Scenes with a scene index above the Last required scene index are specified as streamable in the generated manifest. For an application to start, Unity requires any scene index at or less than the specified index.

Scenes with a greater scene index must include shared assets for Scenes with a lesser index. The order of scenes in the Build Settings dialog may be important to allow the application to locate the required assets.

Application UI

Unity copies these options directly to the Package.appxmanifest file.

The Application UI section on the Universal Windows platform window
The Application UI section on the Universal Windows platform window

The Dispay name value that you set at the top of the Player Settings settings appears in this section. This is the full name of the app.

Enter the text you want to appear on the app’s tile on the Windows Store in the Description text box. This defaults to the Package display name value.

File and Protocol Associations

The settings under the File Type Associations, File Types, and Protocol sections allow you to set up your Windows Store app as the default handler for a certain file type or URI scheme.

File Type Associations section
File Type Associations section

Under the File Type Associations section, enter the name (lowercase only) for a group of file types in the Name text box. These are files that share the same display name, logo, info tip, and edit flags. Choose a group name that can stay the same across app updates.

If you are setting this up as a file association:

  • Click the Add New button. An empty entry appears in the File Types list. You can add multiple file types.
  • Enter the MIME content type in the Content Type text box for a particular file type. For example, image/jpeg.
  • Enter the file type to register for in the File Type text box, preceded by a period (for example, .jpeg).

If you are setting this up as an association with a URI scheme, enter the protocol in the Name text box.

For more information, see Auto-launching with file and URI associations (XAML)

Misc

Unity receives input by subscribing to events. The Input Source setting defines where (which sources) to get input from. Currently this only applies to mouse and touch input, as keyboard input always comes from CoreWindow.

Input source setting for the Universal Windows platform
Input source setting for the Universal Windows platform
Value Функция:
CoreWindow Subscribe to CoreWindow events. This is the default.
Independent Input Source Create Independent Input Source and receive input from it.
SwapChainPanel Subscribe to SwapChainPanel events.

Capabilities

Use the Capabilities section to enable APIs or resources you want your app to access. These could be pictures, music, or devices such as the camera or the microphone.

Capabilities settings for the Universal Windows platform
Capabilities settings for the Universal Windows platform
Capability Функция:
EnterpriseAuthentication Windows domain credentials enable a user to log into remote resources using their credentials, and act as if a user provided their user name and password.
InternetClient Apps can receive incoming data from the Internet. Cannot act as a server. No local network access.
InternetClientServer Same as InternetClient but also enables peer-to-peer (P2P) scenarios where the app needs to listen for incoming network connections.
MusicLibrary Accesses the user’s Music, allowing the app to enumerate and access all files in the library without user interaction. This capability is typically used in jukebox apps that make use of the entire Music library.
PicturesLibrary Accesses the user’s Pictures, allowing the app to enumerate and access all files in the library without user interaction. This capability is typically used in photo apps that make use of the entire Pictures library.
PrivateNetworkClientServer Provides inbound and outbound access to home and work networks through the firewall. This capability is typically used for games that communicate across the local area network (LAN), and for apps that share data across a variety of local devices.
RemovableStorage Accesses files on removable storage, like USB keys and external hard drives.
SharedUserCertificates Allows your app to add and access software and hardware-based certificates in the Shared User store, such as certificates stored on a smart card. This capability is typically used for financial or enterprise apps that require a smart card for authentication.
VideosLibrary Accesses the user’s Videos, allowing the app to enumerate and access all files in the library without user interaction. This capability is typically used in movie-playback apps that make use of the entire Videos library.
WebCam Accesses the video feed of a built-in camera or external webcam, which allows the app to capture photos and videos.
Note: This only grants access to the video stream. In order to grant access to the audio stream as well, the Microphone capability must be added.
Proximity Enables multiple devices in close proximity to communicate with one another. This capability is typically used in casual multi-player games and in apps that exchange information. Devices attempt to use the communication technology that provides the best possible connection, including Bluetooth, Wi-Fi, and the Internet.
Microphone Accesses the microphone’s audio feed, which allows the app to record audio from connected microphones.
Location Accesses location functionality that retrieved from dedicated hardware like a GPS sensor in the PC or derived from available network info.
HumanInterfaceDevice Enables access to Human Interface Device APIs. See How to specify device capabilities for HID for details.
AllJoyn Allows AllJoyn-enabled apps and devices on a network to discover and interact with each other.
BlockedChatMessages Allows apps to read SMS and MMS messages that have been blocked by the Spam Filter app.
Chat Allows apps to read and write all SMS and MMS messages.
CodeGeneration Allows apps to access the following functions which provide JIT capabilities to apps
VirtualProtectFromApp
CreateFileMappingFromApp
OpenFileMappingFromApp
MapViewOfFileFromApp
Objects3D Allows apps to have programmatic access to the 3D object files. This capability is typically used in 3D apps and games that need access to the entire 3D objects library.
PhoneCall Allows apps to access all of the phone lines on the device and perform the following functions.
Place a call on the phone line and show the system dialer without prompting the user.
Access line-related metadata.
Access line-related triggers.
Allows the user-selected spam filter app to set and check block list and call origin information.
UserAccountInformation Accesses the user’s name and picture.
VoipCall Allows apps to access the VOIP calling APIs in the Windows.ApplicationModel.Calls namespace.
Bluetooth Allows apps to communicate with already paired bluetooth devices over both Generic Attribute (GATT) or Classic Basic Rate (RFCOMM) protocol.
SpatialPerception Provides programmatic access to spatial mapping data, giving mixed reality apps information about surfaces in application-specified regions of space near the user. Declare the spatialPerception capability only when your app will explicitly use these surface meshes, as the capability is not required for mixed reality apps to perform holographic rendering based on the user’s head pose.
InputInjectionBrokered Allows apps to inject various forms of input such as HID, touch, pen, keyboard or mouse into the system programmatically. This capability is typically used for collaboration apps that can take control of the system.
Appointments Accesses the user’s appointment store. This capability allows read access to appointments obtained from the synced network accounts and to other apps that write to the appointment store. With this capability, your app can create new calendars and write appointments to calendars that it creates.
BackgroundMediaPlayback Changes the behavior of the media-specific APIs like the MediaPlayer and AudioGraph classes to enable media playback while your app is in the background. All active audio streams will no longer mute, but will continue to be audible when an app transitions to the background. Additionally, app lifetime will be extended automatically while playback is occurring.
Contacts Accesses the aggregated view of the contacts from various contacts stores. This capability gives the app limited access (network permitting rules apply) to contacts that were synced from various networks and the local contact store.
LowLevelDevices Allows apps to access custom devices when a number of additional requirements are met.
OfflineMapsManagement Allows apps to access offline maps.
PhoneCallHistoryPublic Allows apps to read cellular and some VOIP call history information on the device. This capability also allows the app to write VOIP call history entries.
PointOfService Enables access to APIs in the Windows.Devices.PointOfService namespace. This namespace lets your app access Point of Service (POS) barcode scanners and magnetic stripe readers. The namespace provides a vendor-neutral interface for accessing POS devices from various manufacturers from a UWP app.
RecordedCallsFolder Allows apps to access the recorded calls folder.
RemoteSystem Allows apps to have access to a list of devices associated with the user’s Microsoft Account. Access to the device list is necessary to perform any operations that persist across devices.
SystemManagement Allows apps to have basic system administration privileges such as shutting down or rebooting, locale, and timezone.
UserDataTasks Allows apps to have access to the current state of the tasks setting.
UserNotificationListener Allows apps to have access to the current state of the notifications setting.

For more information, see App capability declarations

Unity copies these options directly to the Package.appxmanifest file.

Note: If you build your game on top of previous package, Package.appxmanifest won’t be overwritten.

Supported Device Families

A device family identifies the APIs, system characteristics, and behaviors across a class of devices. It also determines the set of devices on which your app can be installed from the Store. See Microsoft’s Device families overview for more information.

Capabilities settings for the Universal Windows platform
Capabilities settings for the Universal Windows platform
Setting Функция:
Desktop Windows Desktop Extension SDK API contracts for UWP
Mobile Windows Mobile Extension SDK API contracts for UWP
Xbox Xbox Live Extension SDK API contracts for UWP
Holographic Hololens (self-contained, holographic computer) used for Mixed Reality apps
Team Windows Team Extension SDK API contracts for UWP. This is commonly used for Microsoft Surface Hub devices.
IoT Windows IoT Extension SDK API contracts for UWP.
Note Currently, apps targeting IoT or IoTHeadless are not valid in the app store and should be used for development purposes only.
IoTHeadless Similar to IoT but without any UI.
Note Currently, apps targeting IoT or IoTHeadless are not valid in the app store and should be used for development purposes only.

For more information, see Device family availability.

XR Settings

XR Settings for the Standalone Player
XR Settings for the Standalone Player
Свойство: Функция:
Virtual Reality Supported Enable native VR support for the Unity Editor and your game builds.
Virtual Reality SDKs Add and remove Virtual Reality SDKs from the list. This list is only available available when the Virtual Reality Supported is enabled.
To add an SDK to the list, click the plus (+) button.
To remove an SDK from the list, select it and then click the minus (-) button.
Some of the SDKs provide extra settings that appear here. For details, see XR SDKs.
Stereo Rendering Mode Choose how you want to render for a virtual reality device.
Multi Pass This is the normal rendering mode. Unity renders the Scene twice: first to render the left-eye image; and then again for the right-eye image.
Single Pass Render both eye images at the same time into one packed Render Texture. This means that the whole Scene is only rendered once, which significantly reduces CPU processing time.
Single Pass Instanced (Preview) The GPU performs a single render pass, replacing each draw call with an instanced draw call. This heavily decreases CPU use, and slightly decreases GPU use, due to the cache coherency between the two draw calls. Using this mode significantly reduces the power consumption of your application.
Vuforia Augmented Reality Supported Enable this option to use Vuforia Augmented Reality SDK, which is required when using the Vuforia Virtual Reality SDK.
WSA Holographic Remoting Supported Enable this option to use WSA Holographic Remoting. To use this, you must add the Windows Mixed Reality SDK.



  • 2018–11–28 Page amended
  • Support for Universal Windows Platform streaming install added in 2018.3 NewIn20183
  • Input System preview added in Unity 2019.1
Universal Windows Platform: WinRT API in C# scripts
Universal Windows Platform: IL2CPP scripting back end