Version: 2017.2
Universal Windows Platform: WinRT API in C# scripts
Backends de Scripting (programación)

Universal Windows Platform Player Settings

This page details the Player Settings specific to Universal Windows Platform. For a description of the general Player Settings, see documentation on Player Settings.

Most of these settings are transferred to the Package.appxmanifest file when creating Visual Studio solution for the first time.

Note: If you build your project on top of the existing one, Unity won’t overwrite the Package.appxmanifest file if it’s already present. That means if you change something in Player Settings, you should be sure to check Package.appxmanifest. If you want to regenerate Package.appxmanifest, delete it and rebuild your project from Unity.

To learn more, see Microsoft’s documentation on App package manifest.

Settings from Packaging, Application UI, Tile, Splash screen, and Capabilities directly transfer to settings in the Package.appxmanifest file.

Supported orientations from Player Settings are also populated to the manifest (Package.appxmanifest file in Visual Studio solution). On Universal Windows Apps Unity will reset orientation to the one you used in Player Settings, regardless what you specify in the manifest. This is because Windows itself ignores those settings on desktop and tablet computers. Note, that you can always change supported orientations using Unity scripting API.

Certificado

Every Universal Windows App needs a certificate which identifies a developer, Unity will create a default certificate, if you won’t provide your own.

Compilación

As you know, Unity uses Mono when compiling script files, and you can use the API located in .NET 3.5. Compilation Overrides allows you to use .NET for Universal Windows Platform (also known as .NET Core) in your C# files, the API is available here.

Cuando Compilation Overrides se configura a:

  • None - Los archivos de C# son compilados utilizando el compilador de Mono.
  • Use .Net Core - C# files are compiled using Microsoft compiler and .NET Core, you can use Windows Runtime API, but classes implemented in C# files aren’t accessible from the JS language. Note: when using API from Windows Runtime, it’s advisable to wrap the code with ENABLE_WINMD_SUPPORT define, because the API is only avaible when building to Universal Windows Platform, and it’s not available in Unity Editor.
  • Use .Net Core Partially - C# files not located in Plugins, Standard Assets, Pro Standard Assets folders are compiled using Microsoft compiler and .NET Core, all other C# files are compiled using Mono compiler. The advantage is that classes implemented in C# are accessible from the JS language. Note: You won’t be able to test .NET Core API in Unity Editor, because it doesn’t have access to .NET Core, so you’ll be able to test the API only when running Universal Windows App.

Tenga en cuenta: Usted no puede utilizar la .NET Core API en los scripts de JS.

Here’s a simple example of how to use .NET Core API in scripts.

string GetTemporaryFolder()
{
#if ENABLE_WINMD_SUPPORT
    return Windows.Storage.ApplicationData.Current.TemporaryFolder.Path;
#else
    return "LocalFolder";
#endif
}

Misc

Unprocessed Plugins contains a list of plugins which are ignored by Unity’s preprocessing tools (like SerializationWeaver, AssemblyPreprocessor, rrw). Usually you don’t need to modify this list, unless you’re getting an error that Unity’s failed to preprocess your plugin.

If you add a plugin to this list, Unity won’t inject additional IL code into your assembly used for serialization purposes, but if your plugin isn’t referencing UnityEngine.dll, that’s fine, because Unity won’t serialize any data from your plugin.

Fuente de Input Independiente

This allows you to enable an option for independent input source. Basically this makes your input more responsive, and usually you want this option to be enabled.

Low Latency Presentation API Lets you enable Low Latency Presentation API, basically this create D3D11 swapchain with DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT flag, read more here and should increase input responsiveness. This option is disabled by default because on hardware with older GPU drivers, this option makes game laggy, if you enable this option - be sure to profile your game if the performance is still acceptable.

Capacidades

Estas opciones son directamente copiadas a Package.appxmanifest.

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


• 2017–05–16 Page amended with no editorial review

Universal Windows Platform: WinRT API in C# scripts
Backends de Scripting (programación)