Version: 5.6
Windows Store Apps: WinRT API in C# scripts
Windows 스토어: Windows SDK

WSA Player Settings

This page details the Player Settings specific to Windows Store Apps. A description of the general Player Settings can be found here.

대부분의 설정은 Visual Studio 솔루션을 처음 만들 때 Package.appxmanifest로 전송됩니다.

참고: 기존 프로젝트를 토대로 프로젝트를 빌드하면 Unity가 이미 있는 Package.appxmanifest 파일을 덮어쓰지 않습니다. 즉, Player Settings에서 무언가를 변경하는 경우 Package.appxmanifest를 확인해야 합니다. Package.appxmanifest를 다시 생성하려면 간단히 삭제하고 Unity에서 프로젝트를 다시 빌드해야 합니다.

앱 패키지 매니페스트에 대한 자세한 내용은 http://msdn.microsoft.com/en-us/library/windows/apps/br211474.aspx에서 확인할 수 있습니다.

Packaging, Application UI, Tile, 스플래시 화면, Capabilities의 설정은 Package.appxmanifest 파일의 설정으로 직접 전송됩니다.

Supported orientations from Player Settings are also populated to the manifest (Package.appxmanifest file in Visual Studio solution). On Windows 8.1 (both Store and Phone) no further actions are taken, Unity will start in the orientation that is currently present, so if you change your application’s orientation in code before initializing Unity, it will start in that orientation. On Windows 10 Universal 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.

인증서

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

컴파일

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 Windows Store Apps (also known as .NET Core) in your C# files, the API is available here.

컴파일 오버라이드 설정

  • None - Mono 컴파일러를 사용하여 C# 파일을 컴파일합니다.
  • 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 NETFX_CORE define, because the API is only avaible when building to Windows Store Apps, 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 Windows Store App.

참고: .NET Core API를 JS 스크립트에서 사용할 수 없습니다.

다음은 .NET Core API를 스크립트에서 사용하는 방법의 간단한 예입니다.

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

기타(Misc)

처리되지 않은 플러그인에는 Unity의 전처리 툴(SerializationWeaver, AssemblyPreprocessor, rrw 등)에서 무시되는 플러그인의 리스트가 있습니다. Unity가 플러그인을 전처리하는 데 실패했다는 오류가 표시되지 않는 한, 일반적으로 리스트를 수정하지 않아도 됩니다.

리스트에 플러그인을 추가하면 어떻게 될까요?

Unity는 직렬화 용도로 사용되는 어셈블리에 추가 IL 코드를 삽입하지 않지만, 플러그인이 UnityEngine.dll을 레퍼런스하지 않아도 Unity가 사용자 플러그인의 데이터를 직렬화하지 않기 때문에 괜찮습니다.

독립 입력 소스(Input Source)

독립 입력 소스 옵션을 활성화할 수 있습니다. 자세한 내용은 여기서 확인할 수 있습니다. 기본적으로 입력의 응답성을 높이므로, 일반적인 경우 이 옵션을 활성화하는 것이 좋습니다.

낮은 지연율 프레젠테이션 API(Low Latency Presentation API) 낮은 지연율 프레젠테이션 API를 사용할 수 있게 하며, 기본적으로 DXGI\SWAP\CHAIN\FLAG\FRAME\LATENCY\WAITABLE_OBJECT 플래그가 있는 D3D11 스왑체인을 생성합니다. 자세한 내용은 여기를 참조하여 입력 대응 속도를 더 빠르게 할 수 있습니다. 이 옵션은 기본 설정상 비활성화되어 있는데, 오래된 GPU 드라이버가 탑재된 하드웨어에서 이 옵션을 적용하면 게임의 렉이 심해지기 때문입니다. 이 옵션을 사용하게 되면 하드웨어 퍼포먼스가 제대로 작동할 만한지 게임을 반드시 프로파일해야 합니다.

성능

해당 옵션은 Package.appxmanifest로 직접 복사됩니다.

참고: 이전 패키지 위에 게임을 빌드할 경우 Package.appxmanifest를 덮어쓰기가 진행되지 않습니다.

Windows Store Apps: WinRT API in C# scripts
Windows 스토어: Windows SDK
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961