Version: 2021.3
言語: 日本語
macOS
macOS Player - IL2CPP スクリプティングバックエンド

MacOS Player settings

This page details the Player settings specific to Mac OSX. 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 アプリケーションのウィンドウを、全画面ネイティブディスプレイ解像度に設定し、画面全体を覆うようにします。このモードは、ボーダレスフルスクリーンとも呼ばれます。Unity は、アプリケーションのコンテンツを、スクリプトで設定された解像度 (あるいは、何も設定されていない場合はネイティブディスプレイの解像度) でレンダリングし、ウィンドウいっぱいになるようにスケール (拡大縮小) します。スケール時には、コンテンツが引き伸ばされないように、ディスプレイのアスペクト比に合わせてレンダリング出力に黒帯が追加されます。この処理は レターボックス と呼ばれます。OS のオーバーレイ UI はフルスクリーンウィンドウの上に表示されます (IME 入力ウィンドウなど)。このモードは全てのプラットフォームでサポートされています。
Exclusive Fullscreen (Windows only) アプリケーションが、1 つのディスプレイの全画面の独占使用を維持するように設定します。このモードは Fullscreen Window とは異なり、アプリケーションの選択解像度に合わせてディスプレイの OS 解像度を変更します。このオプションは Windows でのみサポートされます。
Maximized Window (Mac only) アプリケーションのウィンドウを、オペレーティングシステムの Maximized の定義に合わせて設定します。macOS では、これは通常、フルスクリーンウィンドウで、メニューバーとドックが非表示の状態です。このオプションは macOS でのみサポートされています。他のプラットフォームでは Fullscreen Window がデフォルト設定です。
Windowed アプリケーション画面を、標準の、全画面表示ではない移動可能なウィンドウに設定します。ウィンドウサイズはアプリケーションの解像度に依存します。このモードでは、ウィンドウはデフォルトでサイズ変更可能になっています。Resizable Window 設定でこれを無効にできます。この全画面モードは、全てのデスクトッププラットフォームでサポートされています。
Default Is Native Resolution ターゲットマシンで使用されているデフォルト解像度をゲームに使用する場合は有効にしてください。Fullscreen ModeWindowed に設定されている場合は、このオプションは使用できません。
Default Screen Width ゲーム画面のデフォルトの幅をピクセル単位で設定します。このオプションは、Full Screen ModeWindowed に設定されている場合にのみ使用できます。
Default Screen Height ゲーム画面のデフォルトの高さをピクセル単位で設定します。このオプションは、Full Screen ModeWindowed に設定されている場合にのみ使用できます。
Mac Retina Support Mac で高 DPI (Retina) 画面をサポートするには、このオプションを有効にしてください。Unity はこれをデフォルトで有効に設定します。有効にすると Retina ディスプレイのプロジェクトの質が向上しますが、リソースの負荷が若干高くなります。
Run In background このオプションを有効にすると、アプリケーションがフォーカスを失った場合に、ゲームが一時停止せず、実行され続けます。

Standalone Player Options

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

Player Options settings for Desktop platforms
Player Options settings for Desktop platforms
プロパティ 機能
Capture Single Screen これを有効にすると、全画面モード のスタンドアロンゲームで、マルチモニター設定時に補助モニターが暗くならないようにします。Mac OS X ではサポートされていません。
Use Player Log これを有効にすると、デバッグ情報を含むログファイルを作成します。デフォルトは有効です。
注意 アプリケーションを Mac App Store に提出する場合は、このオプションを無効にします。詳細は、Mac App Store へ公開 を参照してください。
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 つの同時実行インスタンスに制限できます。
Supported Aspect Ratios 起動時に解像度ダイアログに表示したいアスペクト比を有効にします (ユーザーのモニターにサポートされている場合)。

Splash Image

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

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

Other Settings (その他の設定)

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

Rendering

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

Rendering Player settings for desktop platforms
Rendering Player settings for desktop platforms
Property Description
Color Space Choose which color space Unity uses for rendering: Gamma or Linear. See the Linear rendering overview for an explanation of the difference between the two.
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 disable sRGB sampling for each Texture.
Auto Graphics API for Windows Windows用自動グラフィックスAPIを有効にすると、ゲームが実行されている Windows マシンで最善のグラフィックス API が使用されます。サポートされているグラフィックス API の追加や削除を行うには、無効にしてください。
Auto Graphics API for Mac 有効にすると、実行される Mac マシンで最善のグラフィックス API が使用されます。サポートされているグラフィックス API の追加や削除を行うには、無効にしてください。
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.
Metal API Validation Enable this option when you need to debug Shader issues.
Note: Validation increases CPU usage, so use it only for debugging.
Metal Write-Only Backbuffer Allow improved performance in non-default device orientation. This sets the frameBufferOnly flag on the back buffer, which prevents readback from the back buffer but enables some driver optimization.
Memoryless Depth Choose when to use memoryless render textures. Memoryless render textures are temporarily stored in the on-tile memory when rendered, not in CPU or GPU memory. This reduces memory usage of your app but you cannot read or write to these render textures.
Note: Memoryless render textures are only supported on iOS, tvOS 10.0+ Metal and Vulkan. Render textures are read/write protected and stored in CPU or GPU memory on other platforms.
Unused Never use memoryless framebuffer depth.
Forced Always use memoryless framebuffer depth.
Automatic Let Unity decide when to use memoryless framebuffer depth.
Static Batching Enable this option to use Static batching.
Dynamic Batching Enable this option to use Dynamic Batching on your build (enabled by default).
Note: Dynamic batching has no effect when a Scriptable Render Pipeline is active, so this setting is only visible when nothing is set in the Scriptable Render Pipeline Asset Graphics setting.
Compute Skinning Enable this option to enable DX11/ES3 GPU compute skinning, freeing up CPU resources.
Graphics Jobs 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.
Lightmap Encoding Choose Normal Quality or High Quality to set the lightmap encoding. This setting affects the encoding scheme and compression format of the lightmaps.
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 Enable this property to gather CPU and GPU frame time statistics. Use this together with the Dynamic Resolution camera setting to determine if your application is CPU or GPU bound.
Use Display In HDR Mode (Windows Only) Enable this checkbox to make the game automatically switch to HDR mode output when it runs. This only works on displays that support this feature. If the display does not support HDR mode, the game runs in standard mode.
  Swap Chain Bit Depth Select the number of bits in each color channel for swap chain buffers. Only available if HDR Mode is enabled.
Bit Depth 10 Unity will use the R10G10B10A2 buffer format and Rec2020 primaries with ST2084 PQ encoding.
Bit Depth 16 Unity will use the R16G16B16A16 buffer format and Rec709 primaries with linear color (no encoding).
Virtual Texturing Indicates whether to enable Virtual Texturing.
Note: The Unity Editor requires a restart for this setting to take effect.
Shader precision model Controls the default precision of samplers used in shaders. See Shader data types and precision for more details.
360 Stereo Capture Indicates whether Unity can capture stereoscopic 360 images and videos. When enabled, Unity compiles additional shader variants to support 360 capture (currently only on Windows/OSX). When enabled, enable_360_capture keyword is added during the Stereo RenderCubemap call. Note that this keyword is not triggered outside the Stereo RenderCubemap function. For more information, see Stereo 360 Image and Video Capture.

Vulkan Settings

Vulkan Player settings for macOS.
Vulkan Player settings for macOS.
プロパティ 説明
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 を実行した後に、それを再利用するか解放するか指定します。

Mac App Store Options

Mac App Store Options
Mac App Store Options
プロパティ 機能
Override Default Bundle Identifier Indicates whether you can manually set the bundle identifier.
Note: This setting affects macOS, iOS, tvOS, and Android.
Bundle Identifier Enter the Bundle Identifier of your application. This appears as CFBundleIdentifier in the associated info.plist file. The Bundle Identifier must follow the convention com.YourCompanyName.YourProductName and must contain only alphanumeric and hyphen characters. For more information, see CFBundleIdentifier.
Important: Unity automatically replaces any invalid characters you type with a hyphen.

To set this property, enable Override Default Bundle Identifier.
Build アプリケーションのこのバージョンのビルド番号を入力します。関連する info.plist ファイルに CFBundleVersion として表示されます。詳しくは、Apple 開発者ドキュメントで CFBundleVersion を参照してください。 
Category アプリケーションのタイプに関連する文字列を入力します。App Store はこの文字列を使用して、アプリケーションの適切なカテゴリを決定します。デフォルトでは、ゲームカテゴリ public.app-category.games に設定されています。使用可能なカテゴリのリストは、Apple の開発者のドキュメントのLSApplicationCategoryType を参照してください。
Mac App Store Validation これを有効にすると、Mac App Store からの有効な証明書がある場合にのみアプリケーションが実行されます。これにより、アプリケーションを購入したデバイスとは異なるデバイスで実行することができなくなります。独自の証明書の検証を実装している場合にのみ、この設定を無効にしてください。

Publishing to the Mac App Store

Use Player Log プロパティを使用すると、デバッグ情報を持つログファイルを作成できます。これは、ゲームの問題を調査するのに便利です。ただし、Apple の Mac App Store 用にゲームを公開する場合は、これを無効にする必要があります。これが有効になっていると、Apple から提出を拒否される場合があるためです。ログファイルの詳細は、Unity マニュアルの ログファイル のページを参照してください。

Use Mac App Store Validation プロパティは、Mac App Store のレシート検証を有効にします。有効にすると、ゲームは、Mac App Store からの有効なレシートを持つ場合にのみ実行されます。ゲームを App Store に公開するために提出する場合は、このオプションを有効にします。すると、ゲームを購入したコンピューター以外のコンピューターでゲームを実行できなくなります。

この機能は強力なコピープロテクションを実装していないことに注意してください。特に、ある 1 つの Unity ゲームを不正利用できる能力は、他の Unity コンテンツに対しても不正利用を行うことが可能である恐れがあります。このため、Unity のプラグイン機能を使用して、独自のレシート検証コードを実装することが推奨されます。ただし、画面設定ダイアログを表示する前に Apple による最初のプラグインの検証が必要であるため、このプロパティを有効にして、Apple によってゲームの提出が拒否されるのを避ける必要があります。

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. Windows 用 ILSpy をインストールします。
  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 設定
デスクトッププラットフォーム用の Script Compilation 設定
設定 機能
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
プロパティ 説明
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.

    詳しくは、スタックトレースロギング を参照してください。

Legacy

Legacy settings for desktop platforms
Legacy settings for desktop platforms
プロパティ 機能
Clamp BlendShapes (Deprecated) これを有効にすると、SkinnedMeshRenderers でブレンドシェイプのウェイトの範囲を固定できます。
Upload Cleared Texture Data これは古い機能で現在は必要ありません。なぜなら、帯域幅を使用するからです。デフォルトでは、デバッグのために有効になっています。この設定を有効にすると、初期データがクリアされ、テクスチャがスクリプトからビデオメモリに自動的にアップロードされます。
macOS
macOS Player - IL2CPP スクリプティングバックエンド