Version: 2017.1
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. A description of the general Player Settings can be found here.

La mayoría de estas configuraciones son transferidas a Package.appxmanifest cuando se crea una solution de Visual Studio por primera vez.

Tenga en cuenta: Si construye su proyecto encima del existente, Unity no sobrescribirá el archivo Package.appxmanifest si ya está presente, eso significa que si cambia algo en los Player Settings asegúrese de verificar Package.appxmanifest, si quiere que Package.appxmanifest sea regenerado, simplemente elimínelo, y re-construya su proyecto de Unity.

Para leer más acerca de App package manifest, por favor visite http://msdn.microsoft.com/en-us/library/windows/apps/br211474.aspx.

Los ajustes de Packaging, Application UI, Tile, Splash screen, Capabilities directamente transferidas a los ajustes en el archivo Package.appxmanifest.

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.

Aquí hay un simple ejemplo de cómo utilizar la .NET Core API en los scripts.

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

Misc

Los Plugins sin procesar contienen una lista de plugins que son ignorados por las herramientas de pre-procesamiento de Unity (como SerializationWeaver, AssemblyPreprocessor, rrw), usualmente usted no necesita modificar esta lista, al menos de que usted esté obteniendo un error de que Unity hay fallado de pre-procesar su plugin.

Qué pasará si usted agregará un plugin a esta lista?

Unity no inyectará código IL adicional a su assembly utilizado para los propósitos de serialización, pero si su plugin no está referenciando UnityEngine.dll, eso está completamente bien, ya que Unity no serializará cualquier dato de su plugin.

Fuente de Input Independiente

Le permite a usted habilitar una opción para fuentes de input independientes, usted puede leer más aquí. Básicamente, esto hace que su input sea más responsivo, y usualmente usted quiere que esta opción esté habilitada.

Low Latency Presentation API Let’s 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.

Tenga en cuenta: Si usted está construyendo su juego encima de un paquete previó, Package.appxmanifest no será sobre-escrito.


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

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