Version: 2023.1
言語: 日本語
macOS
macOS 用の開発

macOS の Player 設定

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

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

Icon

Override for Windows, Mac, Linux 設定をアクティブにすると、デスクトップゲーム用にカスタムアイコンを割り当てられます。提供されている各マスに合わせて、異なるサイズのアイコンをアップロードできます。

Resolution and Presentation

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

Resolution

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

プロパティ 説明 
Fullscreen Mode 全画面のモードを選択します。起動時のデフォルトの画面モードを定義します。
Fullscreen Window アプリケーションのウィンドウを、全画面ネイティブディスプレイ解像度に設定し、画面全体を覆うようにします。このモードは、ボーダレスフルスクリーンとも呼ばれます。Unity は、アプリケーションのコンテンツを、スクリプトで設定された解像度 (あるいは、何も設定されていない場合はネイティブディスプレイの解像度) でレンダリングし、ウィンドウいっぱいになるようにスケール (拡大縮小) します。スケール時には、コンテンツが引き伸ばされないように、ディスプレイのアスペクト比に合わせてレンダリング出力に黒帯が追加されます。この処理は レターボックス と呼ばれます。OS のオーバーレイ UI はフルスクリーンウィンドウの上に表示されます (IME 入力ウィンドウなど)。このモードは全てのプラットフォームでサポートされています。
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) アプリケーションのウィンドウを、オペレーティングシステムの Maximized の定義に合わせて設定します。macOS では、これは通常、フルスクリーンウィンドウで、メニューバーとドックが非表示の状態です。このオプションは macOS でのみサポートされています。他のプラットフォームでは Fullscreen Window がデフォルト設定です。
Windowed アプリケーション画面を、標準の、全画面表示ではない移動可能なウィンドウに設定します。ウィンドウサイズはアプリケーションの解像度に依存します。このモードでは、ウィンドウはデフォルトでサイズ変更可能になっています。Resizable Window 設定でこれを無効にできます。この全画面モードは、全てのデスクトッププラットフォームでサポートされています。
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 Set the default width of the game screen in pixels. This option is only available if the Fullscreen Mode is set to Windowed.
Default Screen Height Set the default height of the game screen in pixels. This option is only available if the Fullscreen Mode is set to Windowed.
Mac Retina Support Mac で高 DPI (Retina) 画面をサポートするには、このオプションを有効にしてください。Unity はこれをデフォルトで有効に設定します。有効にすると Retina ディスプレイのプロジェクトの質が向上しますが、リソースの負荷が若干高くなります。
Run In background このオプションを有効にすると、アプリケーションがフォーカスを失った場合に、ゲームが一時停止せず、実行され続けます。

Standalone Player Options

このセクションでは、画面をカスタマイズする設定を行えます。例えば、ユーザーが画面のサイズを変更できるようにするオプションを設定したり、同時に実行可能なインスタンスの数を指定したりすることができます。

プロパティ 説明 
Capture Single Screen このオプションを有効にすると、マルチモニター環境で、全画面モード のスタンドアロンゲームがセカンダリモニターを暗くしません。このオプションは macOS ではサポートされていません。
Use Player Log デバッグ情報を含むログファイルを記述するには、このオプションを有効にします。
注意: アプリケーションを Mac App Store に提出する場合は、このオプションは無効のままにしてください。詳細は Mac App Store への公開 を参照してください。
Resizable Window Activate this option to allow resizing of the desktop player window.
Note: If you deactivate this option, your application can’t use the Windowed Fullscreen Mode.
Visible in Background Activate this option to display the application in the background when using Windowed Fullscreen Mode. This option isn’t supported on macOS.
Allow Fullscreen Switch このオプションを有効にすると、OS のデフォルトの全画面表示キーで全画面モードとウィンドウモードの切り替えができるようになります。
Force Single Instance このオプションを有効にすると、デスクトッププレイヤーを 1 つの同時実行インスタンスに制限できます。
Use DXGI flip model swap chain for D3D11 フリップモデル (flip model) を使用すると最善のパフォーマンスが得られます。この設定は D3D11 グラフィックス API に影響します。このオプションを無効にすると、Windows 7 型の BitBlt モデルに戻ります。詳細は、PlayerSettings.useFlipModelSwapchain を参照してください。

Splash Image

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

Other Settings (その他の設定)

Rendering

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

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 for Windows Enable this option to use the best Graphics API for the Windows machine the application runs on. Disable it to add and remove supported Graphics APIs.
Auto Graphics API for Mac Enable this option to use the best Graphics API for the macOS machine the application runs on. Disable it to add and remove supported Graphics APIs.
Auto Graphics API for Linux Enable this option to use the best Graphics API for the Linux machine the application runs on. Disable it to add and remove supported Graphics APIs.
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.
Static Batching Enable this option to use static batching.
Dynamic Batching Check this box to use Dynamic Batching on your build (enabled by default).
Sprite Batching Threshold Controls the maximum vertex threshold used when batching.
GPU Skinning Enable the use of shaders to calculate mesh skinning and blend shapes on the GPU.
Graphics Jobs Offload graphics tasks (render loops) to worker threads running on other CPU cores. This option reduces the time spent in Camera.Render on the main thread, which can be a bottleneck.
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.
OpenGL: Profiler GPU Recorders Enable profiler recorders when rendering with OpenGL.
Allow HDR Display Output Activate HDR mode output when the application runs. This only works on displays that support this feature. If the display doesn’t support HDR mode, the game runs in standard mode.
Swap Chain Bit Depth Selects the number of bits in each color channel for swap chain buffers. You can select Bit Depth 10 or Bit Depth 16. The option to choose bit depth only becomes available when you enable HDR Mode.

For more information on bit depth, refer to the Scripting API page for D3DHDRDisplayBitDepth.
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 Enable this option to reduce GPU memory usage and texture loading times if your Scene has many high resolution textures. For more information, refer to Virtual Texturing.

Note: The Unity Editor requires a restart for this setting to take effect.
360 Stereo Capture Indicates whether Unity can capture stereoscopic 360 images and videos. For more information, refer to Stereo 360 Image and Video Capture.
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.

Vulkan Settings

Property Description
SRGB Write Mode Enable this option to let the Graphics.SetSRGBWrite() renderer toggle the sRGB write mode during runtime. Use this to deactivate Linear-to-sRGB write color conversion.
Number of swapchain buffers Set this option to 2 for double-buffering, or 3 for triple-buffering to use with the Vulkan renderer. This setting might help with latency on some platforms, but usually you shouldn’t change this from the default value of 3. Double-buffering might have a negative impact on performance.
Acquire swapchain image late as possible Enable this to get the backbuffer after the frame renders to an offscreen staging image. Enabling this setting adds an extra blit when presenting the backbuffer. This setting, in combination with double-buffering, can improve performance. However, it also can cause performance issues as the additional blit uses extra bandwidth.
Recycle command buffers Enable this option to recycle CommandBuffers after Unity executes them.

Mac App Store Options

プロパティ 説明 
Override Default Bundle Identifier バンドル識別子を手動で設定するかどうかを示します。

ノート: この設定は macOS、iOS、tvOS、Android に影響します。
Bundle Identifier アプリケーションのバンドル識別子を入力します。これは、関連の info.plist ファイル内に CFBundleIdentifier として表示されます。バンドル識別子は、com.YourCompanyName.YourProductName の規則に従い、英数字とハイフンのみで構成されている必要があります。詳細は CFBundleIdentifier を参照してください。

重要: Unityは、入力された無効な文字を自動的にハイフンに置き換えます。
Build Enter the build number for this version of your app. This appears as CFBundleVersion in the associated info.plist file. For more information, refer to CFBundleVersion.
カテゴリ アプリケーションのタイプに対応する文字列を入力します。App Store はこの文字列を使用してアプリケーションの適切なカテゴリを選択します。これはデフォルトでは public.app-category.games です。詳細は LSApplicationCategoryType を参照してください。
Mac App Store Validation 有効にすると、Mac App Store からの有効なレシートがある場合にのみアプリが実行されるようになります。これにより、ゲームが別のデバイスで実行されるのを防ぐことができます。この設定を無効にするのは、独自のレシート検証を実装している場合のみにしてください。

Publishing to the Mac App Store

The Use Player Log property creates a log file with debugging information, helping to investigate any problems with your game. Deactivate this when publishing games for Apple’s Mac App Store, as Apple can reject your submission if activated. For more information, refer to Log Files. The Use Mac App Store Validation property activates receipt validation for the Mac App Store. If activated, your game only runs when it has a valid receipt from the Mac App Store. Use this when submitting games to Apple for publishing on the App Store. This prevents people from running the game on a different computer.

ノート: この機能は強力なコピープロテクションは実装しません。特に、ある 1 つの Unity ゲームに対して行われ得るコピープロテクト解除は、他の Unity コンテンツにも機能する恐れがあります。このため、Unity のプラグイン機能を使用して、この設定に加えて独自のレシート検証コードも実装することが推奨されます。Apple は、最初のプラグイン検証が画面設定ダイアログの表示前に行われることを要求しているため、Apple によってゲームの提出が拒否されるのを避けるために、このプロパティを有効にすることが推奨されます。

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 設定でビルドすることを推奨します。
IL2CPP Stacktrace Information Choose the information to include in a stack trace. For further details on the information types, refer to Managed stack traces with IL2CPP.
Method Name Include each managed method in the stack trace.
Method Name, File Name, and Line Number Include each managed method with file and line number information in the stack trace.

Note: Using this option can increase both the build time and final size of the built program.
Use incremental GC インクリメンタルガベージコレクターを使用します。これは、ガベージコレクションを数フレームにわたって分散させ、フレーム中におけるガベージコレクション関連のスパイクを減らします。詳細は 自動メモリ管理 を参照してください。
Allow downloads over HTTP HTTP によるコンテンツのダウンロードを許可するかどうか指定します。デフォルトのオプションは Not allowed です。これは、推奨されるプロトコルが、より安全な HTTPS であるためです。
Not Allowed HTTP によるダウンロードを一切許可しません。
Allowed in Development Builds HTTP によるダウンロードを、開発ビルドの場合にのみ許可します。
Always Allowed 開発ビルドとリリースビルドの両方で、HTTP によるダウンロードを許可します。
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.

API Compatibility Level

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

  1. Windows 用 ILSpy をインストールします。
  2. 問題のある API 互換性レベルの .NET アセンブリを ILSpy にドラッグします。これらは Frameworks/Mono/lib/mono/YOURSUBSET/ の下にあります。
  3. サードパーティ製アセンブリをドラッグします。
  4. サードパーティのアセンブリを右クリックし、Analyze を選択します。
  5. 分析レポートの中で、Depends on セクションを調査します。このレポートでは “そのサードパーティ製アセンブリに依存するが、選択した .NET 互換性レベルで使用できないもの” が全て強調表示されます。

Mac Configuration

Property Description
Camera Usage Description Enter the reason for accessing the camera on the device.
Microphone Usage Description Enter the reason for accessing the microphone on the device.
Bluetooth Usage Description Enter the reason for accessing the device’s Bluetooth connection.
Supported URL schemes A list of supported URL schemes. To add new schemes, increase the value of the Size property, then set a reference to the Asset to load in the new Element box that appears.

Shader Settings

プロパティ 説明 
Shader precision model シェーダーで使用するサンプラーのデフォルト精度を選択します。詳細は シェーダーのデータ型と精度 を参照してください。
Strict shader variant matching シェーダーバリアントがない場合に、エラーシェーダーを使用して、コンソールにエラーを表示します。
Keep Loaded Shaders Alive ロードされた全てのシェーダーを保持し、アンロードを防ぎます。

Shader Variant Loading Settings

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

プロパティ 説明 
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 の値をオーバーライドします。

Script compilation

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

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

全ての引数を追加し終えたら、Apply をクリックして追加的な引数を未来のコンパイルに含めます。Revert をクリックすると、このリストが最後に適用された状態にリセットされます。
Suppress Common Warnings C# の警告 CS0169 および CS0649 を表示するかどうかを示します。
Allow ‘unsafe’ Code 事前に定義されたアセンブリ (例: Assembly-CSharp.dll) 内の ‘unsafe’ C# コード のコンパイルのサポートを有効にします。
アセンブリ定義ファイル (.asmdef) の場合は、.asmdef ファイルのいずれかをクリックし、表示される Inspector ウィンドウでオプションを有効にします。
Use Deterministic Compilation -deterministic C# フラグでのコンパイルを防止するかどうか指定します。この設定を有効にすると、コンパイルされたアセンブリは、コンパイルされるたびにバイト単位で同じになります。

詳細は Microsoft のドキュメント 決定的コンパイラーオプション を参照してください。

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.
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.
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.

Stack Trace

各 Log Type に対応するオプションを有効にして、希望のログタイプを選択します。

プロパティ 説明 
None ログが記録されません。
ScriptOnly スクリプト実行時のみログが記録されます。
Full 常にログが記録されます。

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

Legacy

プロパティ 説明 
Clamp BlendShapes (Deprecated) Activate the option to clamp the range of blend shape weights in SkinnedMeshRenderers.
macOS
macOS 用の開発