Version: 2023.1
言語: 日本語
Android 用の環境設定
Android キーストア

Android Player 設定

This page details the Player Settings for the Android platform. For a description of the general Player settings, refer to Player Settings.

Android の Player 設定
Android の Player 設定

プロパティのドキュメントは、Player UI のそれぞれのセクションに応じてグループ化されています。

Icon

Icon セクションを使用して、デバイスでアプリケーションを表現するアイコンを指定します。

Android のアイコン設定](../uploads/Main/PlayerSetAndroidIcon.png)

設定 説明 
Adaptive Android 8.0(API レベル 26)以上を搭載するデバイスでアプリケーションを表現する、さまざまなサイズのテクスチャを指定します。
Round Android 7.1(API レベル 25)以上を搭載するデバイスでアプリケーションを表現する、さまざまなサイズのテクスチャを指定します。
Legacy Android 7.1 (APIレベル 25)より前のバージョンを搭載するデバイスでアプリケーションを表現する、さまざまなサイズのテクスチャを指定します。

Resolution and Presentation

Resolution and Presentation (解像度と表示) セクションを使用して、画面の表示をカスタム化します。

設定 説明 
Fullscreen Mode デバイス上のウィンドウの表示方法を指定します。起動時のデフォルトのウィンドウモードを設定します。
Fullscreen Window アプリケーションウィンドウは、デバイスの全画面のネイティブ解像度を埋めます。全画面ウィンドウを埋めるために、Unity はアプリケーションのコンテンツをスケールします。Resolution Scaling Mode は、Unityがコンテンツをどのようにスケールするかを制御します。このモードでは、ナビゲーションバーは常に非表示です。
Windowed このアプリケーションは、標準の、全画面表示ではない、移動可能な画面を使用します。画面サイズはアプリケーションの解像度に依存します。このモードでは、画面はデフォルトでサイズ変更可能です。これを無効にするには、Resizable Window を無効にします。
Resizable Window Indicates whether the user can resize the application’s window.
This setting enables multi-window capabilities in your application on Android phones and tablets. For more information, refer to Google’s developer documentation.
Default Window Width アプリケーション画面のデフォルトの幅 (ピクセル単位)。このオプションは、Fullscreen ModeWindowed に設定されている場合にのみ使用できます。
Default Window Height アプリケーション画面のデフォルトの高さ (ピクセル単位)。このオプションは、Fullscreen ModeWindowed に設定されている場合にのみ使用できます。
Minimum Window Width アプリケーション画面の最小幅 (ピクセル単位)。このオプションは、Fullscreen ModeWindowed に設定されている場合にのみ使用できます。
Minimum Window Height アプリケーション画面の最小の高さ (ピクセル単位)。このオプションは、Fullscreen ModeWindowed に設定されている場合にのみ使用できます。
Hide Navigation Bar ウィンドウの上部に表示されるナビゲーションバーを非表示にするかどうかを示します。
Render outside safe area Indicates whether the application should use all available screen space to render, including areas of the display that are cut out (notched). For more information, refer to Android’s display cutout support documentation.
Optimized Frame Pacing Unity がフレームレートのばらつきを少なくするために、フレームを均等に供給するかどうかを示します。このオプションを有効にすると、よりスムーズな体験が可能になります。
Run In background Enable this option to not pause the application when it loses focus. When disabled, the application pauses when it loses focus.

その他の Resolution and Presentation 設定は、以下のセクションにグループ化されています。

Resolution Scaling

画面解像度のスケーリングに関する設定をカスタマイズするには、Resolution Scaling セクションを使用します。デバイスのネイティブ解像度よりも低い解像度を使用すると、パフォーマンスとバッテリー寿命が向上します。

設定 説明 
Resolution Scaling Mode アプリケーションの解像度をスケールするかどうか、またその方法を指定します。スケーリングは、ネイティブの画面解像度と同等またはそれ以下に設定できます。低い解像度を使用すると、パフォーマンスとバッテリー寿命が向上します。
Disabled 解像度スケーリングを適用せず、アプリケーションはデバイスのネイティブ画面解像度でレンダリングします。
FixedDPI ターゲット DPI を使用して解像度のスケーリングを適用します。パフォーマンスとバッテリ-寿命を最適化したり、特定の DPI 設定をターゲットにする場合に使用します。
Letterboxed コンテンツが引き伸ばされないように、描画された出力に黒帯を追加します。この処理は レターボックスと と呼ばれます。
Target DPI アプリケーションの解像度。デバイスのネイティブスクリーン DPI がこの値より高い場合、Unity はこの設定に合わせてアプリケーションの解像度をダウンスケールします。スケールを計算するには、Unity は以下を使います。
min(Target DPI * Factor / Screen DPI, 1)
ここで FactorQuality settingsResolution Scaling Fixed DPI Factor です。ノート: このオプションは、Resolution Scaling ModeFixed DPI に設定した場合のみ表示されます。
Reset resolution on window resize ネイティブウィンドウサイズが変更されたときに、画面解像度を新しいネイティブウィンドウサイズに設定するかどうかを指定します。 Resolution Scaling ModeFixed DPI に設定すると、Unity は Fixed DPI プロパティに基づき解像度を再計算します。
Blit Type 最終的な画像を画面にレンダリングする際に、blit を使用するかどうかを制御します。blit の使用はほとんどのデバイスと互換性がありますが、通常、blit を使用しない場合よりも速度が低下します。
Always Unity はオフスクリーンバッファにレンダリングし、次に blit を使用してバッファのコンテンツをデバイスのフレームバッファにコピーします。これはほとんどのデバイスと互換性がありますが、通常、blit を使用しない場合よりも速度が低下します。
Never Unityは、デバイスのオペレーティングシステムが提供するフレームバッファにレンダリングします。これが失敗すると、アプリケーションはデバイスログに 1 回限りの警告を出力します。これは通常、blit を使用するよりも高速ですが、すべてのデバイスと互換性があるわけではありません。
Auto Unity は、可能であればデバイスのオペレーティングシステムが提供するフレームバッファにレンダリングします。これが失敗した場合、Unity はデバイスコンソールに警告を出力し、blit を使用して最終的な画像を画面にレンダリングします。

Supported Aspect Ratio

Supported Aspect Ratio セクションを使用して、サポートするデバイスのアスペクト比に関する設定をカスタマイズします。

設定 説明 
Aspect Ratio Mode アプリケーションがサポートする最大アスペクト比を指定します。デバイスのアスペクト比がこのアスペクト比より大きい場合、Unity はアプリケーションにこのアスペクト比を使用し、アプリケーションが引き伸ばされないように黒帯を追加します。
Legacy Wide Screen (1.86) このアプリケーションは、Android の従来のワイドスクリーンアスペクト比までをサポートします。
Native Aspect Ratio このアプリケーションは、Android のネイティブのアスペクト比までをサポートします。
Custom このアプリケーションは、Up To で設定したアスペクト比までをサポートします。
  Up To カスタムの最大アスペクト比。

この設定は、Aspect Ratio ModeCustom に設定したときのみ表示されます。

Orientation

Orientation セクションを使用して、デバイス上のアプリケーションの向きに関連する設定をカスタマイ ズすることができます。

Default Orientation ドロップダウンからゲームの画面の向きを選択します。

設定 説明 
Default Orientation アプリケーションが使用する画面の向きを指定します。

ノート: Unity は、この設定に設定した値を Android と iOS で共有します。
Portrait このアプリケーションは、アプリケーションのウィンドウの下部がデバイスの画面の下部に一致する縦向き画面を使用します。
Portrait Upside Down このアプリケーションは、アプリケーションのウィンドウの下部とデバイスの画面の上部が一致する縦向き画面を使用します。
Landscape Right このアプリケーションは、アプリケーションのウィンドウの右側がデバイスの画面の下部に位置する横向き画面を使用します。
Landscape Left このアプリケーションは、アプリケーションのウィンドウの右側がデバイスの画面の上部に位置する横向き画面を使用します。
Auto Rotation 画面は、自動回転に使用できる向き で指定した向きに回転できます。

Allowed Orientations for Auto Rotation

Allowed Orientations for Auto Rotation セクションを使用して、 Default Orientation から Auto Rotation を設定するときにアプリケーションがサポートする方向を指定します。これは、例えば、アプリケーションを横向きのままして、ユーザーが横向きの左と右を切り替えられるようにする場合に便利です。

このセクションは Default OrientationAuto Rotation に設定されている場合にのみ表示されます。

設定 説明 
Portrait アプリケーションが、アプリケーションウィンドウの下部がデバイスの画面の下部と揃う縦向きの画面をサポートするかどうかを示します。
Portrait Upside Down アプリケーションが、アプリケーションウィンドウの下部がデバイスの画面の上部と揃う縦向きの画面をサポートするかどうかを示します。
Landscape Right アプリケーションが、アプリケーションウィンドウの右側がデバイスの画面の底部と揃う横向きの画面をサポートするかどうかを示します。
Landscape Left アプリケーションが、アプリケーションウィンドウの右側がデバイスの画面の上部と揃う横向きの画面をサポートするかどうかを示します。

Other

Resolution and Presentation セクションには、以下の一般設定も含まれます。

設定 説明 
Use 32-bit Display Buffer ディスプレイバッファが 16 ビットカラー値ではなく 32 ビットカラー値を保持するかどうかを示します。バンディングが発生したり、ポストプロセスエフェクト でアルファ値が必要な場合は、この設定を有効にします。ポストプロセスエフェクトの中には、ディスプレイバッファと同じ形式で レンダーテクスチャ を作成するものがあるため、この設定が必要です。
Disable Depth and Stencil 深度バッファとステンシルバッファを無効にするかどうかを示します。
Render Over Native UI Android または iOS で、ネイティブ UI の上にレンダリングするかどうかを示します。この設定を有効にするには、Camera の Clear Flags を設定して、アルファ値が 1 より低いソリッドカラーを使用するようにします。
Show Loading Indicator ローディングインジケーターを表示するかどうか、またどのように表示するかを指定します。
Don’t Show ローディングインジケーターを表示しません。
Large 大きなローディングインジケーターを表示します。
Inversed Large 大きなローディングインジケーターを反転色で表示します。
Small 小さなローディングインジケーターを表示します。
Inversed Small 小さなローディングインジケーターを反転色で表示します。

Splash Image

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

VR のスプラッシュ設定
VR のスプラッシュ設定

一般的な Splash Screen 設定の下で、Android 特有の Static Splash Image を設定できます。

Android のスプラッシュスクリーン設定
Android のスプラッシュスクリーン設定
設定 説明 
Image Android のスプラッシュスクリーンとしてアプリケーションが使用するテクスチャを指定します。スプラッシュスクリーン用画像の標準的なサイズは 320x480 です。
Scaling デバイスの画面に合わせてスプラッシュ画像を拡大縮小する方法を指定します。
Center (only scale down) 画像が大きすぎる場合を除き、ネイティブの大きさで描画します。画像が大きすぎ場合は、Unity が画像が収まるように縮小します。
Scale to Fit (letter-boxed) 画像の縦横どちらか長い方が画面サイズにぴったり合うように描画します。短辺側の空きスペースは、黒で塗りつぶされます。
Scale to Fill (cropped) 画像を縦横どちらか短い方が画面サイズにぴったり合うようにスケールします。長辺側の画面におさまらない部分はクロップされます。

Other Settings

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

Rendering

これらの設定を使用して、Android プラットフォーム向けにゲームをレンダリングする方法をカスタマイズします。

Property Description
Color Space Choose which color space to use for rendering. For more information, refer to Linear rendering overview.
Gamma Gamma color space is typically used for calculating lighting on older hardware restricted to 8 bits per channel for the framebuffer format. Even though monitors today are digital, they might still take a gamma-encoded signal as input.
Linear Linear color space rendering gives more precise results. When you select to work in linear color space, the Editor defaults to using sRGB sampling. If your Textures are in linear color space, you need to work in linear color space and deactivate sRGB sampling for each Texture.
Auto Graphics API Disable this option to manually pick and reorder the graphics APIs. By default, this option is enabled, and Unity tries to use Vulkan. If the device doesn’t support Vulkan, Unity falls back to GLES3.2, GLES3.1 or GLES3.0.
Important: Unity adds the GLES3.1/GLES3.1+AEP/GLES3.2 requirement to your Android App Manifest only if you enable Auto Graphics API or if Graphics APIs includes OpenGLES3.
Graphics APIs Specifies which graphics APIs the application supports. Unity tries to use the graphics API at the top of the list first and, if the device doesn’t support it, Unity falls back to the next graphics APIs in the list.

This property is visible only when Auto Graphics API is set to false.
Vulkan Adds Vulkan as an API to target.
OpenGLES3 Adds OpenGLES 3 as an API to target.
Require ES3.1 Indicates whether to require that the minimum OpenGL ES 3 minor version is 3.1.
This property is visible only if you enable Auto Graphics API or if Graphics APIs includes OpenGLES3.
Require ES3.1+AEP Indicates whether to require that the minimum OpenGL ES 3 minor version is 3.1+AEP.
This property is visible only if you enable Auto Graphics API or if Graphics APIs includes OpenGLES3.
Require ES3.2 Indicates whether to require that the minimum OpenGL ES 3 minor version is 3.2.
This property is visible only if you enable Auto Graphics API or if Graphics APIs includes OpenGLES3.
Color Gamut You can add or remove color gamuts 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.
Multithreaded Rendering Enable this option to move graphics API calls from Unity’s main thread to a separate worker thread. This can help to improve performance in applications that have high CPU usage on the main thread.
Static Batching Enable this option to use static batching.
Dynamic Batching Check this box to use Dynamic Batching on your build (enabled by default).
Compute Skinning Enable this option to use DX11/DX12/ES3 GPU compute skinning, which frees up CPU resources.
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.
Texture compression formats Choose between ASTC, ETC2 and ETC (ETC1 for RGB, ETC2 for RGBA), DXTC and DXT + RGTC(BC4, BC5). Refer to texture compression format overview for more information on how to pick the right format. It’s possible to add multiple texture compression formats to this list for texture compression targeting support, however you can’t have both DXT and DXT + RGTC(BC4, BC5) in this list at the same time. If you enable texture compression targeting, Unity also enables, Split Application Binary.
Refer to Texture compression settings for more details on how this interacts with the texture compression setting in the Build Settings.

Note: If you export or build your application as an APK, Unity only uses the first texture compression format in this list.
Normal Map Encoding Choose XYZ or DXT5nm-style to set the normal map encoding. This setting affects the encoding scheme and compression format used for normal maps. DXT5nm-style normal maps are of higher quality, but more expensive to decode in shaders.
Lightmap Encoding Defines the encoding scheme and compression format of the lightmaps.
You can choose from Low Quality, Normal Quality, or High Quality
HDR Cubemap Encoding Defines the encoding scheme and compression format of the HDR Cubemaps.
You can choose from Low Quality, Normal Quality, or High Quality. For more information, refer to Lightmaps: Technical information.
Lightmap Streaming Enable this option 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 Sets 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 Enable this option to gather CPU/GPU frame timing statistics.
Virtual Texturing Indicates whether to enable Virtual Texturing.
Note: Virtual Texturing isn’t compatible with Android.
Shader precision model Controls the default precision of samplers used in shaders. For more information, refer to Shader data types and precision.
360 Stereo Capture Indicates whether Unity can capture stereoscopic 360 images and videos. For more information, refer to Stereo 360 Image and Video Capture.Note: 360 stereoscopic capturing isn’t compatible with Android.
Load/Store Action Debug Mode Highlights undefined pixels that might cause rendering problems on mobile platforms. This affects the Unity Editor Game view, and your built application if you select Development Build in Build Settings. Refer to LoadStoreActionDebugModeSettings for more information.
Editor Only Indicates whether the Load/Store Action Debug Mode only runs in the Unity Editor.

This property is visible only when Load/Store Action Debug Mode is set to true.

Vulkan Settings

Property Description
SRGB Write Mode このオプションを有効にすると、Graphics.SetSRGBWrite() レンダラーが、ランタイム中に sRGB 書き込みモードを切り替えられるようになります。つまり、リニアから sRGB への書き込み色変換を一時的にオフにしたい場合は、このプロパティを使用してそれを行えます。有効にした場合、モバイルのタイルベース GPU のパフォーマンスに悪影響を与えるので、モバイルでは有効にしないでください。
Number of swapchain buffers このオプションを 2 に設定するとダブルバッファリング、3 に設定するとトリプルバッファリングが、Vulkan レンダラーに使用されます。この設定は、一部のプラットフォームでは待ち時間の改善に役立つ場合がありますが、ほとんどの場合はデフォルト値の 3 のままにすることが推奨されます。ダブルバッファリングはパフォーマンスに悪影響を及ぼす可能性があります。Android ではこの設定は使用しないでください。
Acquire swapchain image late as possible 有効にすると、Vulkan は、バックバッファの取得を遅らせ、フレームをオフスクリーン画像にレンダリングした後でそれを行います。Vulkan は、ステージング画像を使用してこれを行います。この設定を有効にすると、バックバッファを表示する時に Blit が 1 つ追加で発生します。この設定とダブルバッファリングを組み合わせることで、パフォーマンスを向上させることができます。ただし、追加の Blit が帯域幅を使用するため、パフォーマンスの問題を引き起こす可能性もあります。
Recycle command buffers Unity が CommandBuffers を実行した後に、それを再利用するか解放するか指定します。
Apply display rotation during rendering Enable this to perform all rendering in the native orientation of the display. This has a performance benefit on many devices. For more information, see documentation on Framebuffer orientation.

Identification

プロパティ 機能
Override Default Package Name アプリケーションのデフォルトのパッケージ名をオーバーライドするかどうかを示します。
ノート: この設定は、macOS、iOS、tvOS、Android に影響します。
  Package Name アプリケーション ID を設定します。この ID は、デバイス上と Google Play ストア上でアプリケーションを識別します。アプリケーション ID は、com.YourCompanyName.YourProductName 規約に従い、英数字とアンダースコア以外は使用できません。各セグメントはアルファベットで始める必要があります。詳細については、アプリケーション ID の設定 を参照してください。
重要: Unity は、入力した無効な文字を自動的に削除します。
このプロパティを設定するには、Override Default Package Name を有効にします。
Version バンドルのイテレーション (リリースされたかどうかにかかわらず) を示す、バンドルのビルドバージョン番号を入力します。バージョンはドットで区切られた数字を含む一般的な文字列の形式 (4.3.2 など) で特定されます。これは iOS と Android 間で共有されます。
Bundle Version Code 内部バージョン番号。この数は、あるバージョンがもう 1 つのバージョンよりも新しいかを判断するためだけに使用されます。大きい数はより最近のバージョンであることを表します。これは、ユーザーに表示されるバージョン番号ではありません。その番号は、versionName 属性によって設定されます。値は、100 のような整数で設定する必要があります。ただし、後に続くバージョンに大きな数を与える限り、好きな数を決定できます。

例えば、ビルド番号も可能です。または、“x.y” 形式のバージョン番号を “x” と “y” を下位と上位の 16 ビットに別々にエンコードすることによって、整数に変換できます。

Split APKs by target architecture が有効になっている場合、この数を 100000 未満にしてください。各 APK には一意のバージョンコードが必要であるため、Unity は ARMv7 の数に 100000、ARM64 に 200000 を加えます。
Minimum API Level アプリケーションを実行するのに必要な API の最小バージョン (API レベル)
Target API Level アプリケーションをコンパイルするターゲットの Android バージョン (API レベル)

Configuration

Property Description
Scripting Backend 使用したいスクリプティングバックエンドを選択します。スクリプティングバックエンドは、Unity がプロジェクトで C# コードをどのようにコンパイルおよび実行するかを決定します。
Mono C# コードを .NET 共通中間言語 (CIL) にコンパイルし、その CIL を Common Language Runtime (共通言語ランタイム) を使用して実行します。詳細は Mono を参照してください。
IL2CPP C# コードを CIL にコンパイルし、CIL を C++ に変換し、その C++ をネイティブのマシンコードにコンパイルし、これがランタイムで直接実行されます。詳細は IL2CPP を参照してください。
API Compatibility Level Choose which .NET APIs you can use in your project. This setting can affect compatibility with third-party libraries. However, it has no effect on Editor-specific code (code in an Editor directory, or within an Editor-specific Assembly Definition).

Tip: If you are having problems with a third-party assembly, you can try the suggestion in the API Compatibility Level section below.
.Net Framework Compatible with the .NET Framework 4 (which includes everything in the .NET Standard 2.0 profile plus additional APIs). Choose this option when using libraries that access APIs not included in .NET Standard 2.0. Produces larger builds and any additional APIs available aren’t necessarily supported on all platforms. For more information, refer to Referencing additional class library assemblies.
.Net Standard 2.1 Produces smaller builds and has full cross-platform support.
Editor Assemblies Compatibility Level Select which .NET APIs to use in your Editor assemblies.
.NET Framework Compatible with the .NET Framework 4 (which includes everything in the .NET Standard 2.1 profile plus additional APIs). Choose this option when using libraries that access APIs not included in .NET Standard 2.1. Produces larger builds and any additional APIs available aren’t necessarily supported on all platforms. For more information, refer to Referencing additional class library assemblies.
.NET Standard Compatible with .NET Standard 2.1. Produces smaller builds and has full cross-platform support.
IL2CPP Code Generation Defines how Unity manages IL2CPP code generation.

Note: To use this, set Scripting Backend to IL2CPP.
C++ Compiler Configuration IL2CPP 生成コードのコンパイル時に使用する C++ コンパイラー設定を選択します。
Debug Debug 設定は全ての最適化を無効にします。これにより、コードのビルドがより素早くなりますが実行がより遅くなります。
Release Release 設定を使用すると最適化が有効になるため、コンパイルされたコードの実行がより速くなり、バイナリサイズがより小さくなりますが、コンパイル時間がより長くなります。
Master Master 設定は、考えられる全ての最適化を有効にし、パフォーマンスを可能な限り向上させます。例えば、MSVC++ コンパイラーを使用するプラットフォームでは、このオプションによって、リンク時のコード生成が有効になります。この設定を使用したコードのコンパイルは、Release 設定を使用した場合と比較して、大幅に時間がかかる可能性があります。Unity は、ビルド時間の伸長が許容範囲内であれば、ゲームの公開版は Master 設定でビルドすることを推奨します。
Use incremental GC インクリメンタルガベージコレクターを使用します。これは、ガベージコレクションを数フレームにわたって分散させ、フレーム中におけるガベージコレクション関連のスパイクを減らします。詳細は 自動メモリ管理 を参照してください。
Allow downloads over HTTP HTTP によるコンテンツのダウンロードを許可するかどうか指定します。デフォルトのオプションは Not allowed です。これは、推奨されるプロトコルが、より安全な HTTPS であるためです。
Not Allowed HTTP によるダウンロードを一切許可しません。
Allowed in Development Builds HTTP によるダウンロードを、開発ビルドの場合にのみ許可します。
Always Allowed 開発ビルドとリリースビルドの両方で、HTTP によるダウンロードを許可します。
Mute Other Audio Sources Indicates whether your Unity application should stop audio from applications running in the background. Otherwise, Audio from background applications continues to play alongside your Unity application.
Target Architectures Specifies which architecture to target.
ARMv7 Enable support for ARMv7 architecture.
ARM64 Enable support for ARM64 architecture.
x86 (ChromeOS) Enable support for x86 architecture.
x86–64 (ChromeOS and Magic Leap 2) Enable support for x86–64 architecture.
Enable Armv9 Security Features for Arm64 Enable Pointer Authentication (PAuth, PAC) and Branch Target Identification (BTI) for Arm64 builds.

This property is visible only when Arm64 is set to true.
Split APKs by target architecture Enable this option to create a separate APK for each CPU architecture selected in Target Architectures. This makes download size smaller for Google Play Store users. This is primarily a Google Play store feature and may not work in other stores. For more details, refer to Multiple APK Support.
Target Devices Specifies the target devices on which the APK is allowed to run.
All Devices The APK is allowed to run on all Android and ChromeOS devices.
Phones, Tablets, and TV Devices Only The APK is allowed to run on Android phones, tablets, and TVs, but not on ChromeOS devices.
ChromeOS Devices Only The APK is allowed to run on ChromeOS devices, but not on Android phones or tablets.
Install Location Specifies application install location on the device (for detailed information, refer to Android Developer documentation on install locations.
Automatic Let the operating system decide. User will be able to move the app back and forth.
Prefer External Install the application to external storage (SD card) if possible. The operating system doesn’t guarantee it; if not possible, the app will be installed to internal memory.
Force Internal Force the application to be installed to internal memory. The user will be unable to move the app to external storage.
Internet Access Choose whether to always add the networking (INTERNET) permission to the Android App Manifest, even if you are not using any networking APIs. Set to Require by default for development builds.
Auto Only add the internet access permission if you are using a networking API.
Require Always add the internet access permission.
Write Permission Choose whether to enable write access to the external storage (such as the SD card) and add a corresponding permission to the Android App Manifest. Set to External(SDCard) by default for development builds.
Internal Only grant write permission to internal storage.
External(SDCard) Enable write permission to external storage.
Filter Touches When Obscured Enable this option to discard touches received when another visible window is covering the Unity application. This is to prevent tapjacking.
Sustained Performance Mode Enable this option to set a predictable and consistent level of device performance over longer periods of time, without thermal throttling. Overall performance might be lower when this setting is enabled. Based on the Android Sustained Performance API.
Maximum Java Heap Size Set the maximum Java heap size to user for building (in megabytes). Defaults to 4096.
Low Accuracy Location Enable this option to use low accuracy values with Android location APIs instead.
ChromeOS Input Emulation ChromeOS’s default behaviour is to convert mouse and touchpad input events into touchscreen input events. Un-check this setting to disable the default behavior.
Android TV Compatibility Enable this option to mark the application as Android TV compatible.
Android Game Enable this option to mark the output package (APK) as a game rather than a regular application.

This property is visible only when Android TV Compatibility is set to true.
Android Gamepad Support Level Choose the level of support your application offers for a gamepad.

This property is visible only when Android TV Compatibility is set to true.
Works with D-Pad The application is fully operational with a D-pad. No gamepad is needed.
Supports Gamepad The application works with a gamepad, but doesn’t require it.
Requires Gamepad The application requires a gamepad to use.
Warn about App Bundle size Enable this option to receive a warning when the size of the Android App Bundle exceeds a certain threshold. This option is selected by default and you can only configure it if you enable the Build App Bundle (Google Play) option in the Build settings.
App Bundle size threshold Enter a size in Mb. When your App Bundle exceeds this size, Unity will display a warning.
Application Entry Point The application entry points to generate for your application. For more information, refer to Android application entry points.
Activity Generate an Activity application entry point.
GameActivity Generate a GameActivity application entry point.
Active Input Handling Choose how to handle input from users.
Input Manager (Old) Uses the traditional Input settings.
Input System Package (New) Uses the Input system. This option requires you to install the InputSystem package.
Both Use both systems.

Shader Variant Loading

これらの設定を使用して、ランタイムにシェーダーが使用するメモリの量を制御します。

プロパティ 説明 
Default chunk size (MB) 全てのプラットフォームに対して、ビルドされたアプリケーション内に Unity が保存する圧縮シェーダーバリアントデータチャンクの最大サイズを設定します。デフォルトは 16 です。詳細は シェーダーロード を参照してください。
Default chunk count 全てのプラットフォームに対して、Unity がメモリに保持する解凍チャンク数のデフォルト制限を設定します。デフォルトは 0 で、これは制限がないことを意味します。
Override このビルドターゲットの Default chunk sizeDefault chunk count のオーバーライドを有効にします。
Chunk size (MB) このビルドターゲットの Default chunk size (MB) の値をオーバーライドします。
Chunk count このビルドターゲットの Default chunk count の値をオーバーライドします。

API Compatibility Level

全てのターゲットに関して Mono の API 互換性レベルを選択できます。サードパーティ製 .NET ライブラリは、.NET 互換性レベル外の機能を使用することもあります。そのような場合に、何が起きているかを理解し、最善の修正方法を把握するためには、以下を試みてください。

  1. Windows 用 ILSpy をインストールします。
  2. 問題のある API 互換性レベルの .NET アセンブリを ILSpy にドラッグします。これらは Frameworks/Mono/lib/mono/YOURSUBSET/ の下にあります。
  3. サードパーティ製アセンブリをドラッグします。
  4. サードパーティのアセンブリを右クリックし、Analyze を選択します。
  5. In the analysis report, inspect the Depends on section. The report highlights anything that the third-party assembly depends on, but that is not available in the .NET compatibility level of your choice in red.

Script Compilation

Android プラットフォームのスクリプトコンパイル設定
Android プラットフォームのスクリプトコンパイル設定
プロパティ 説明 
Scripting Define Symbols カスタムコンパイルフラグを設定します。

詳細は 条件付きコンパイル を参照してください。
Additional Compiler Arguments 追加的な引数を Roslyn コンパイラーに渡すために、このリストにエントリーを追加します。追加の引数それぞれに対して新しいエントリーを 1 つ使用します。
新しいエントリーを作成するには、Add (+) をクリックしてください。エントリーを削除するには Remove (-) をクリックしてください。

全ての引数を追加し終えたら、Apply をクリックして追加的な引数を未来のコンパイルに含めます。Revert をクリックすると、このリストが最後に適用された状態にリセットされます。
Suppress Common Warnings C# の警告 CS0169 および CS0649 を表示するかどうかを示します。
Allow ‘unsafe’ Code Enables 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.
Use Deterministic Compilation Indicates whether to prevent compilation with the -deterministic C# flag. With this setting enabled, compiled assemblies are byte-for-byte the same each time they’re compiled.

For more information, refer to C# Compiler Options that control code generation.

Optimization

Property Description
Prebake Collision Meshes Adds collision data to Meshes at build time.
Preloaded Assets Sets 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 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 do not 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 Chooses how aggressively Unity strips unused managed (C#) code. 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 smaller, but can sometimes remove code that’s in use.

For more information about these options and bytecode stripping with IL2CPP, refer to ManagedStrippingLevel.
Minimal Use this to strip class libraries, UnityEngine, Windows Runtime assemblies, and copy all other assemblies.
Low Remove unreachable managed code to reduce build size and Mono/IL2CPP build times.
Medium Run UnityLinker to reduce code size beyond what Low can achieve. You might need to support a custom link.xml file, and some reflection code paths might not behave the same.
High UnityLinker will strip as much code as possible. This will further reduce code size beyond what Medium can achieve but managed code debugging of some methods might no longer work. You might need to support a custom link.xml file, and some reflection code paths might not behave the same.
Enable Internal Profiler (Deprecated) This feature is deprecated and will be retired in a future version of Unity. Use the Profiler window instead (menu: Window > Analytics > Profiler).

The Profiler collects application performance data and prints a report to the console. The report contains the number of milliseconds each Unity subsystem takes to execute on each frame, averaged across 30 frames.
Vertex Compression Sets vertex compression per channel. 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 more information on how to configure vertex compression and limitations of this setting, refer to Compressing mesh data.
Optimize Mesh Data Enable this option to strip unused vertex attributes from the mesh used in a build. This option reduces the amount of data in the mesh, which can help reduce build size, loading times, and runtime memory usage.

Warning: If you have this setting enabled, don’t change material or shader settings at runtime.

For more information, refer to PlayerSettings.stripUnusedMeshComponents.
Texture MipMap Stripping Enables mipmap stripping for all platforms. It 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 hasn’t been stripped.

Logging

特定のコンテキストで許可するログのタイプを選択します。

Androidプラットフォームのログ設定
Androidプラットフォームのログ設定
  • Select your preferred stack trace method by enabling the option 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

Clamp BlendShapes (Deprecated) オプションを有効にすると、SkinnedMeshRenderers でブレンドシェイプのウェイトの範囲を固定できます。

Publishing Settings

Publishing Settings を使って、Unity が Android アプリケーションをビルドする方法を設定します。 Publishing 設定を開くには、Edit > Project Settings に移動し、Player を選択し、Android アイコンを選択し、Publishing Settings パネルを開きます。

このセクションでは、Publishing Settings パネルの各部分とその機能について説明します。以下の内容が含まれます。

Android publishing panel
Android publishing panel

ノート: セキュリティ上の理由から、Unity は Keystore や Project Key のパスワードを保存しません。

Use the Keystore Manager window to create, configure and load your keys and keystores. You can load existing keystores and keys from either the Keystore Manager or the main Android Publishing panel. If you choose to load these from inside the Keystore Manager, Unity automatically fills the Project Keystore and Project Key fields. For further information, refer to the documentation on Keystore Manager.

Project Keystore

キーストアとは、アプリケーションのセキュリティのための署名鍵を保持するコンテナです。詳しくは、Android 開発者向けドキュメント Android keystore system を参照してください。

Project Keystore の設定で、開いているプロジェクトに使用するキーストアを選択します。キーストアをロードすると、Unity はそのキーストア内のすべてのキーをロードします。 開いているプロジェクトに既存のキーストアをロードして使用するには、以下を行います。

  1. Custom Keystore を有効にします。
  2. Select ドロップダウンを開き、 Browse を選択して、ファイルシステムからキーストアを選択します。
  3. Keystore password を入力します。

既存のキーストアがない場合は、Custom Keystore を無効にしておきます。

Unity では、アプリケーションの署名にデバッグ用の鍵ストアを使用します。 デバッグ用のキーストアは、作業用のキーストアです。これにより、アプリケーションを署名し、ローカルでテストすることができます。ただし、アプリストアはこの方法で署名されたアプリを拒否します。これは、アプリストアが、デバッグ用のキーストアを使用したアプリケーションの有効性と所有権を検証できないためです。

プロパティ 説明 
Custom Keystore Custom Keystore を有効にして、既存のキーストアをロードして使用します。
Select When Custom Keystore is enabled, use this to select the keystore you want to use. The keystores below the partition in the Select dropdown are stored in a predefined dedicated location. For more details, refer to Choose the keystore location.
Path キーストアのパスを入力する必要はありません。選択したキーストアに基づいて Unity が提供します。
Password キーストアのパスワードを入力して、選択したキーストアをロードします。

Project Key

キーストアをロードすると、Unity はそのキーストア内のすべてのキーをロードします。Project Key 設定を使ってキーストアから 1 つのキーを選択し、開いているプロジェクトのアクティブキーとして使います。

プロパティ 説明 
Alias 開いているプロジェクトで使用するキーを選択します。
Password キーとなるパスワードを入力します。

Build

デフォルトでは、Unity は、Unity のインストール時に提供されたマニフェストファイル、Gradle テンプレート、Proguard ファイルを使ってアプリケーションをビルドします。これらを変更するには、Android Publishing Settings の Build セクションを使用します。

カスタムのマニフェストファイル、Gradle テンプレート、Proguard ファイルを使用する場合は、以下を行います。

  1. 該当するチェックボックスを有効にします。Unity はプロジェクト内にデフォルトファイルを作成し、チェックボックスの下にファイルの場所が表示されます。
  2. 新しいファイルを開いて、変更を加えます。
  3. このファイルに変更を保存してください。Unity は、このファイルに保存された変更を次回のアプリケーションビルド時に自動的に使用します。

Build セクションの設定は、現在のプロジェクトのビルドプロセスにのみ適用されます。

プロパティ 説明 
Upgrade templates to C# Opens the Android Templates Upgrader window which you can use to upgrade your custom Gradle template files to use the Android Project Configuration Manager.
Custom Main Manifest Android の LibraryManifest.xml ファイルのカスタマイズ可能なバージョンです。このファイルには、Android アプリケーションに関する重要なメタデータが含まれています。Main/Unity Library Manifest の機能の詳細は、Unity Library Manifest を参照してください。
Custom Launcher Manifest Android の LauncherManifest.xml ファイルのカスタマイズ可能なバージョンです。このファイルには、Android アプリケーションのランチャーに関する重要なメタデータが含まれています。Unity Launcher Manifest の機能の詳細は、Unity Launcher Manifest を参照してください。
Custom Main Gradle Template mainTemplate.gradle ファイルのカスタマイズ可能なバージョンです。このファイルには、Android アプリケーションをライブラリとしてビルドする方法に関する情報が含まれています。詳細については、Gradle プロジェクトファイル のドキュメントを参照してください。
Custom Launcher Gradle Template mainTemplate.gradle ファイルのカスタマイズ可能なバージョンです。このファイルには、Android アプリケーションをビルドする方法に関する情報が含まれています。詳細については、Gradle プロジェクトファイル のドキュメントを参照してください。
Custom Base Gradle Template Customizable version of the baseProjectTemplate.gradle file. This file contains configuration that is shared between all other templates and Gradle projects. For more information, refer to the documentation on Gradle project files.
Custom Gradle Properties Template gradle.properties ファイルのカスタマイズ可能版です。このファイルには、Gradle のビルド環境の構成設定が含まれています。これには以下が含まれます。
• JVM(Java Virtual Machine)のメモリ設定
• Gradle が複数の JVM を使ってビルドできるようにするためのプロパティ
• 最小化を行うツールを選択するためのプロパティ
• アプリケーションバンドルのビルド時にネイティブリブを圧縮しないためのプロパティ
Custom Gradle Settings Template settingsTemplate.gradle ファイルのカスタマイズ可能なバージョンです。このファイルには、アプリケーションに必要な外部依存関係を解決するためのアーティファクトリポジトリの宣言が含まれています。
Custom Proguard File Customizable version of the proguard.txt file. This file contains configuration settings for the minification process. If minification removes some Java code which should be kept, you should add a rule to keep that code in this file. For more information refer to the documentation on Minification.

Minify

Minification is a process which shrinks, obfuscates and optimizes the code in your application. It can reduce the code size and make the code harder to disassemble. Use the Minify settings to define when and how Unity should apply minification to your build.

In most cases, it’s good practice to only apply minification to release builds, and not debug builds. This is because minification takes time, and can make the builds slower. It can also make debugging more complicated due to the optimization that the code undergoes.

Note: If the Java code is referenced via reflection, the minification process (R8/Proguard) cannot infer that the code is in use and strips that code. You can use Custom Proguard File to retain the code that you require.

Munify セクションの設定は、現在のプロジェクトのビルドプロセスにのみ適用されます。

プロパティ 説明 
Release リリースビルド時にアプリケーションのコードを小型化したい場合は、このチェックボックスを有効にします。
Debug デバッグビルド時にアプリケーションのコードを小型化したい場合は、このチェックボックスを有効にします。

Split Application Binary

Split Application Binary オプションを有効にすると、出力パッケージをメイン (APK) パッケージと拡張 (OBB) パッケージに分割します。これは 100 MB を超えるアプリケーションを公開する場合は、 Goolge Play ストアによって必須とされています。

Report Dependencies in App Bundle

Enable this option to include information about dependencies in App Bundle if you’re planning to build your application as Android App Bundle (AAB) for Google Play. For more information, refer to Report App Dependencies section.

Note: You can only interact with this setting if you enable Build App Bundle (Google Play) option in Android Build Settings.



  • 5.5 のアップデート機能
  • Sustained Performance Mode は 2017.3 で追加
  • .NET 4.x ランタイムは 2018.1 で追加
  • Android 複数のAPK 機能は 2018.2 で追加
  • Android 用 OpenGL ES 3.2 サポートは、2019.1 で追加NewIn20191
  • Input System プレビューは Unity 2019.1 で追加
  • Render outside safe area は Unity 2019.1 で追加
  • Warn about App Bundle size オプションは Unity 2019.2 で追加
  • GPU Skinning の名称が Unity 2019.3 で Compute Skinning に変更されました
  • Vuforia は Unity 2019.3 で削除
  • ビルトイン XR SDK のサポートは Unity 2019.3 で非推奨NewIn20193
  • テクスチャ圧縮用に更新

PlayerSettingsAndroid

Android 用の環境設定
Android キーストア