Version: 2021.3
言語: 日本語
Unity を Windows と UWP アプリケーションへ統合
Windows Player build binaries

Windows Player settings

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

MacOS Player settings
MacOS Player settings

以下のセクションのプロパティが説明されています。

Icon

デスクトップゲームにカスタムアイコンを割り当てるには、Override for Windows, Mac, Linux 設定を有効にします。それぞれの四角に合ったさまざまなサイズのアイコンをアップロードできます。

Icon settings for the desktop platforms
Icon settings for the desktop platforms

Resolution and Presentation

Resolution and Presentation (解像度と表示) セクションの ResolutionStandalone Player Options を使用して、画面の表示をカスタマイズします。

Resolution

このセクションでは、スクリーンモードとデフォルトサイズをカスタマイズできます。

Resolution section for the Desktop Player platforms
Resolution section for the Desktop Player platforms
プロパティ 機能
Fullscreen Mode 全画面のモードを選択します。起動時のデフォルトの画面モードを定義します。
Fullscreen Window Set your app window to the full-screen native display resolution, covering the whole screen. This mode is also known as borderless full-screen. Unity renders the app content at the resolution set by a script, or the native display resolution if none is set and scales it to fill the window. When scaling, Unity adds black bars to the rendered output to match the display aspect ratio to prevent content stretching. This process is called letterboxing. The OS overlay UI displays on top of the full-screen window (such as IME input windows). All platforms support this mode.
Exclusive Fullscreen (Windows only) Set your app to maintain sole full-screen use of a display. Unlike Fullscreen Window, this mode changes the OS resolution of the display to match the app’s chosen resolution. This option is only supported on Windows.
Maximized Window (Mac only) Set the app window to the operating system’s definition of maximized, which is typically a full-screen window with a hidden menu bar and dock on macOS. This option is only supported on macOS. Fullscreen Window is the default setting for other platforms.
Windowed Set your app to a standard, non-full-screen movable window, the size of which is dependent on the app resolution. In this mode, the window is resizable by default. Use the Resizable Window setting to disable this. All desktop platforms support this full-screen mode.
Default Is Native Resolution Enable this option to make the game use the default resolution used on the target machine. This option isn’t available if the Fullscreen Mode is set to Windowed.
Default Screen Width ゲーム画面のデフォルトの幅をピクセル単位で設定します。このオプションは、Full Screen ModeWindowed に設定されている場合にのみ使用できます。
Default Screen Height ゲーム画面のデフォルトの高さをピクセル単位で設定します。このオプションは、Full Screen ModeWindowed に設定されている場合にのみ使用できます。
Mac Retina Support Enable this option to enable support for high DPI (Retina) screens on a Mac. Unity enables this by default. This enhances Projects on a Retina display, but it’s somewhat resource-intensive when active.
Run In background Enable this option to have the game running in the background instead of pausing if the app loses focus.

Standalone Player Options

このセクションでは、ユーザーが画面をカスタマイズする方法を指定できます。例えば、ユーザーが画面のサイズを変更できるかどうか、同時に実行できるインスタンスの数を決定できます。

スタンドアロンプレイヤープラットフォームの Standalone Player Option 設定
スタンドアロンプレイヤープラットフォームの Standalone Player Option 設定
プロパティ 機能
Capture Single Screen Enable this option to ensure standalone games in Fullscreen Mode do not darken the secondary monitor in multi-monitor setups.
Use Player Log Enable this option to write a log file with debugging information. Defaults to enabled.
Resizable Window Enable this option to allow resizing of the desktop player window.
Note: If you disable this option, your application can’t use the Windowed Fullscreen Mode.
Visible in Background これを有効にすると、Windows で Fullscreen ModeWindowed が使用されている場合に、アプリケーションを背景で表示します。
Allow FullScreen Switch これを有効にすると、デフォルトの全画面キーを押して全画面のモードと Windowed モードを切り替えることができます。
Force Single Instance これを有効にすると、デスクトッププレイヤーを 1 つの同時実行インスタンスに制限できます。
Use DXGI flip model swap chain for D3D11 Using the flip model ensures the best performance. This setting affects the D3D11 graphics API. Disable this option to fall back to the Windows 7-style BitBlt model. For more information, see PlayerSettings.useFlipModelSwapchain.

Splash Image

Virtual Reality Splash Image 設定を使用して、VR ディスプレイのカスタムスプラッシュ画像を指定します。一般的なスプラッシュスクリーン の設定については、スプラッシュスクリーン を参照してください。

Splash Image Player settings for desktop platforms
Splash Image Player settings for desktop platforms

Other Settings (その他の設定)

このセクションでは、以下のグループに分類されたさまざまなオプションをカスタマイズできます。

Rendering

Use these settings to customize how Unity renders your game for desktop platforms.

Rendering Player settings for desktop platforms
Rendering Player settings for desktop platforms
プロパティ 機能
Color Space レンダリングに GammaLinear どちらの色空間を使用するかを選択します。
2 つの色空間の違いについては リニアレンダリングの概要 を参照してください。
Auto Graphics API for Windows これを有効にすると、ゲームが実行されている Windows マシンで最高のグラフィックス API を使用できます。これを無効にすると、サポートされているグラフィックス API を追加したり削除したりできます。
Auto Graphics API for Mac Enable this option to use the best Graphics API on the Mac the game is running on. Disable it to add and remove supported Graphics APIs. Windows does not support this property.
Auto Graphics API for Linux これを有効にすると、ゲームが実行されている Linux マシンで最高のグラフィックス API を使用できます。これを無効にすると、サポートされているグラフィックス API を追加したり削除したりできます。
Color Gamut for Mac You can add or remove color gamuts for the Mac platform to use for rendering. Click the plus (+) icon to see a list of available gamuts. A color gamut defines a possible range of colors available for a given device (such as a monitor or screen). The sRGB gamut is the default (and required) gamut. Windows does not support this property.
Metal API Validation シェーダーの問題をデバッグする必要がある場合は、このオプションを有効にします。
ノート 検証は CPU 使用率を増加させます。そのため、デバッグにのみ使用してください。
Metal Write-Only Backbuffer デフォルトではないデバイスの向きでパフォーマンスを向上させます。これにより、バックバッファに frameBufferOnly フラグを設定します。これは、バックバッファからの読み直しを防ぎますが、ドライバ-の最適化が可能になることもあります。
Memoryless Depth いつ メモリレスレンダーテクスチャ を使用するかを選択します。メモリレスレンダーテクスチャはレンダリング時に、CPU や GPU メモリではなく、タイル上のメモリに一時的に格納されます。これにより、アプリケーションのメモリ使用量が削減されますが、これらのレンダーテクスチャを読み書きすることはできません。
ノート メモリレスレンダーテクスチャは、iOS、tvOS 10.0以降、Metal、Vulkan でのみサポートされます。レンダーテクスチャは読み取り/書き込み保護され、他のプラットフォームの CPU や GPU メモリに保存されます。
Unused メモリレスフレームバッファ深度を決して使用しません。
Forced 常にメモリレスフレームバッファ深度を使用します。
Automatic メモリレスフレームバッファ深度をいつ使用するかは Unity が決定します。
Static Batching このオプションを有効にして、静的バッチ処理を行います。
Dynamic Batching ビルドで 動的バッチング を使用するには、これを有効にします (デフォルトでは有効)。
ノート 動的バッチングは、スクリプタブルレンダーパイプライン がアクティブな場合は効力がありません。そのため、この設定は、Graphics 設定の Scriptable Render Pipeline Asset で何も設定されていない場合にのみ表示されます。
Compute Skinning DX11/ES3 GPU コンピュートスキニングを使用するには、CPU リソースを解放します。
Graphics Jobs これを有効にすると、Unity がグラフィックスタスク (レンダリングのループ) を他の CPU コア上で動作するワーカースレッドにオフロードします。これは、しばしばボトルネックとなるメインスレッドの Camera.Render で費やされる時間を短縮するためのものです。
Lightmap Encoding ライトマップのエンコードを設定するには、Normal QualityHigh Quality を選択します。この設定は、ライトマップのエンコードスキームと圧縮形式に影響します。
HDR Cubemap Encoding Choose Low Quality, Normal Quality, or High Quality to set the HDR Cubemap encoding. This setting affects the encoding scheme and compression format of the HDR Cubemaps.
Lightmap Streaming Whether to use Mipmap Streaming for lightmaps. Unity applies this setting to all lightmaps when it generates them.
Note: To use this setting, you must enable the Texture Streaming Quality setting.
Streaming Priority Set the priority for all lightmaps in the Mipmap Streaming system. Unity applies this setting to all lightmaps when it generates them.
Positive numbers give higher priority. Valid values range from –128 to 127.
Frame Timing Stats このプロパティを有効にすると、CPU と GPU のフレームタイム統計が収集されます。このプロパティを 動的解像度 のカメラ設定と合わせて使用することで、アプリケーションが CPU と GPU のどちらに依存しているかを判断できます。
Use Display In HDR Mode (Windows Only) このチェックボックスを有効にすると、実行時にゲームが自動的に HDR (ハイダイナミックレンジ) モード出力に切り替わります。これは、この機能をサポートするディスプレイでのみ機能します。ディスプレイが HDR モードをサポートしない場合、ゲームは標準モードで実行されます。
Swap Chain Bit Depth スワップチェーンバッファの各色チャンネルのビット数を選択します。HDR (ハイダイナミックレンジ) モードが有効な場合にのみ使用可能です。
Bit Depth 10 Unity は、R10G10B10A2 バッファ形式と ST2084 PQ エンコードの Rec2020 プライマリを使用します。
Bit Depth 16 Unity は R16G16B16A16 バッファ形式とリニア色の Rec709 プライマリ (エンコード無し) を使用します。

Vulkan Settings

Vulkan Player settings for macOS.

Property Description
SRGB Write Mode Enable this option to allow Graphics.SetSRGBWrite() renderer to toggle the sRGB write mode during runtime. That is, if you want to temporarily turn off Linear-to-sRGB write color conversion, you can use this property to achieve that. Enabling this has a negative impact on performance on mobile tile-based GPUs; therefore, do NOT enable this for mobile.
Number of swapchain buffers Set this option to 2 for double-buffering, or 3 for triple-buffering to use with Vulkan renderer. This setting may help with latency on some platforms, but in most cases you should not change this from the default value of 3. Double-buffering might have a negative impact on performance. Do not use this setting on Android.
Acquire swapchain image late as possible If enabled, Vulkan delays acquiring the backbuffer until after it renders the frame to an offscreen image. Vulkan uses a staging image to achieve this. Enabling this setting causes an extra blit when presenting the backbuffer. This setting, in combination with double-buffering, can improve performance. However, it also can cause performance issues because the additional blit takes up bandwidth.
Recycle command buffers Indicates whether to recycle or free CommandBuffers after Unity executes them.

Configuration

デスクトッププラットフォームの Configuration 設定
デスクトッププラットフォームの Configuration 設定
設定 機能
Scripting Backend 使用したいスクリプティングバックエンドを選択します。スクリプティングバックエンドは Unity のプロジェクトで C# コードをコンパイルし実行する方法を決定します。
Mono C# コードを .NET Common Intermediate Language (CIL) にコンパイルし、それを Common Language Runtime を使用して実行します。詳細は、Mono プロジェクト に関するウェブサイトを参照してください。
IL2CPP C# コードを CIL にコンパイルし、CIL を C++ に変換し、次に、その C++ をネイティブのマシンコードにコンパイルします。これは、ランタイムに直接実行されます。詳細は IL2CPP を参照してください。
API Compatibility Level プロジェクトに使用する .NET API を選択します。この設定は、サードパーティ製ライブラリとの互換性に影響を与えます。
ヒント サードパーティ製アセンブリに問題がある場合は、後述の API Compatibility Level セクションを参照してください。
.Net Standard .NET Standard 2.0 と互換性があります。ビルドは小さく、完全なクロスプラットフォームをサポートします。
.Net Framework .NET Framework 4 (.NET Standard 2.0 プロファイルのすべてと追加 API を含む) と互換性があります。.NET Standard 2.0 に含まれていない API にアクセスするライブラリを使用する場合は、このオプションを選択します。より大きいビルドが作成され、使用可能な追加の API がすべてのプラットフォームで必ずしもサポートされるわけではありません。詳細は、追加のクラスライブラリアセンブリの参照 を参照してください。
C++ Compiler Configuration IL2CPP 生成コードをコンパイルするときに使用する C++ コンパイラーの設定を選択します。
ノート このプロパティは、Scripting BackendIL2CPP に設定されない限り、無効です。
Use incremental GC Enable this to use the incremental garbage collector, which spreads garbage collection over several frames to reduce gc-related spikes in frame duration.
Active Input Handling ユーザーからの入力をどのように処理するかを選択します。
Input Manager (old) Use the default Input window.
Input System (Preview) 新しい Input (入力) システムを使用します。入力システムはこのリリースのプレビューパッケージとして提供されています。Input System のプレビュー版を使用するには、InputSystem パッケージ をインストールしてください。
Both 両方のシステムを同時に使用できます。

API Compatibility Level

すべてのターゲットに対する Mono の API Compatibility Level (API 互換性レベル) を選択できます。時にはサードパーティ製の .NET ライブラリが、.NET 互換性レベル外の機能を使用することがあります。そのような場合に何が起きているか理解し、最良の修正処理を行うためには、以下を試みると良いでしょう。

  1. Install ILSpy for Windows.
  2. Drag the .NET assemblies for the API compatilibity level that you are having issues with into ILSpy. You can find these under Frameworks/Mono/lib/mono/YOURSUBSET/.
  3. サードパーティ製のアセンブリをドラッグします。
  4. サードパーティ製のアセンブリを右クリックし、Analyze を選択します。
  5. 分析レポートの中で、Depends on セクションを調べます。サードパーティ製品依存でありながら、選択した .NET 互換性レベルで対応しないものはすべてここで赤字でハイライトされます。

Script Compilation

Script compilation settings for desktop platforms
Script compilation settings for desktop platforms
設定 機能
Scripting Define Symbols カスタムコンパイルフラグを設定します。詳細は、プラットフォーム依存コンパイル のドキュメントを参照してください。
Additional Compiler Arguments このリストにエントリーを追加して、Roslyn コンパイラーに追加の引数を渡します。追加の引数ごとに 1 つの新しいエントリーを使用します。
新しいエントリーを作成するには、 ‘+’ ボタンを押します。エントリーを削除するには、 ‘-’ ボタンを押します。
必要な引数をすべて追加したら、Apply ボタンをクリックして、追加した引数を今後のコンパイルに加えることができます。 Revert ボタンは、このリストを最近適用された状態にリセットします。
Suppress Common Warnings C#の警告 CS0169CS0649 を表示するには、この設定を無効にします。
Allow ‘unsafe’ Code 事前に定義されたアセンブリ (例えば Assembly-CSharp.dll) の ‘unsafe’ C# code をコンパイルするサポートを有効にします。
アセンブリ定義ファイル (.asmdef) の場合、.asmdef ファイルの 1 つをクリックし、表示されたインスペクターウィンドウでオプションを有効にします。
Use Deterministic Compilation この設定を無効にすると、-deterministic C# フラグでのコンパイルができなくなります。この設定を有効にすると、コンパイルされたアセンブリは、コンパイルされるたびにバイト単位で同一になります。
詳細については、Microsoft の コード生成を制御する C# コンパイラ オプション を参照してください。
Enable Roslyn Analyzers この設定を無効にすると、プロジェクト内に存在する可能性のある Roslyn アナライザー DLL を使用せずに、ユーザーが作成したスクリプトをコンパイルします。

Optimization

Optimization settings for desktop platforms
Optimization settings for desktop platforms
Property Description
Prebake Collision Meshes Enable this option to add collision data to Meshes at build time.
Keep Loaded Shaders Alive When enabled, you cannot unload a shader. See Shader Loading for more information.
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, then set a reference to the Asset to load in the new Element box that appears.
AOT compilation options Additional options for Ahead of Time (AOT) compilation. This helps optimize the size of the built iOS player.
Strip Engine Code Enable this option if you want the Unity Linker tool to remove code for Unity Engine features that your Project doesn’t use. This setting is only available with the IL2CPP scripting backend.

Most apps don’t use every available DLL. This option strips out DLLs that your app doesn’t use to reduce the size of the built Player. If your app is using one or more classes that would normally be stripped out under your current settings, Unity displays a debug message when you try to build the app.
Managed Stripping Level Choose how Unity strips unused managed (C#) code.The options are Disabled Low, Medium, and High.

When Unity builds your app, the Unity Linker process can strip unused code from the managed DLLs your Project uses. Stripping code can make the resulting executable significantly smaller, but can sometimes accidentally remove code that is in use. For more information about these options, see documentation on Managed code stripping.

For information about bytecode stripping with IL2CPP, see documentation on Managed bytecode stripping with IL2CPP.
Vertex Compression Choose the channel that you want to set for compressing meshes under the vertex compression method, which by default, is set to Mixed. This affects all the meshes in your project. Typically, Vertex Compression is used to reduce the size of mesh data in memory, reduce file size, and improve GPU performance. For information on how to configure vertex compression and limitations of this setting, see [compressing meshes].
Optimize Mesh Data Selecting this option enables stripping of unused vertex attributes from the mesh used in a build.
This reduces the amount of data in the mesh, which might help reduce build size, loading times, and runtime memory usage. However, you must remember to not change material or shader settings at runtime, if you have this setting enabled. See PlayerSettings.stripUnusedMeshComponents for more information.
Texture MipMap Stripping Enable this option to enable mipmap stripping for all platforms, which strips unused mipmaps from Textures at build time. Unity determines unused mipmaps by comparing the value of the mipmap against the Quality Settings for the current platform. If a mipmap value is excluded from every Quality Setting for the current platform, then Unity strips those mipmaps from the build at build time. If QualitySettings.masterTextureLimit is set to a mipmap value that has been stripped, Unity will set the value to the closest mipmap value that has not been stripped.

Logging

スタンドアロンプレイヤープラットフォームの Logging 設定
スタンドアロンプレイヤープラットフォームの Logging 設定
  • Select your preferred logging method from the available options.

  • Check a box that corresponds to each Log Type (Error, Assert, Warning, Log, and Exception) based on the type of logging you require. For example:
    • ScriptOnly: Logs only when running scripts.
    • Full: Logs all the time.
    • None: No logs are ever recorded.

    See stack trace logging for more information.

Legacy

Legacy settings for desktop platforms
Legacy settings for desktop platforms
プロパティ 機能
Clamp BlendShapes (Deprecated) これを有効にすると、SkinnedMeshRenderers でブレンドシェイプのウェイトの範囲を固定できます。
Upload Cleared Texture Data これは古い機能で現在は必要ありません。なぜなら、帯域幅を使用するからです。デフォルトでは、デバッグのために有効になっています。この設定を有効にすると、初期データがクリアされ、テクスチャがスクリプトからビデオメモリに自動的にアップロードされます。
Unity を Windows と UWP アプリケーションへ統合
Windows Player build binaries
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961