Unity Player command line arguments reference
A list of arguments you can use when you launch a built Player from the command line.
Read time 6 minutesLast updated 13 days ago
You can launch Unity Players from the command line and pass in arguments to change how the Player executes.
These arguments work on all standalone platforms except for the Web platform. The following table specifies any additional platform requirements.
For more information on launching Unity from the command line, refer to Run Unity from a command-line interface.
Command | Description |
|---|---|
| Run the application in headless mode. In this mode, the application doesn't display anything or accept user input. |
| Disables Graphics Processing Unit (GPU) skinning at startup. |
| Disable connecting to AcceleratorKeyEvent. This might help if you have issues with input in XAML elements. Note: Unity can't handle some keyboard keys, such as F10, Ctrl, Alt, and Tab. |
| Use this together with |
| Force the application to use Direct3D 11 for rendering. |
| Force the application to use DXGI BitBlt model swapchain when using Direct3D 11. For more information, refer to |
| Force the application to use DXGI flip model swapchain when using Direct3D 11. For more information, refer to |
| Force DirectX 11.0 to be created without a |
| Force DirectX 11.0 to be created with a |
| Force the application to use Direct3D 12 for rendering. |
| Make the Standalone Player use a specific GPU device by passing it the index of that GPU. This option is supported for D3D11, D3D12, Metal, and Vulkan graphics APIs, but isn't supported for OpenGL. |
| Force the DirectX 11.0 driver type WARP device. For more information, refer to Microsoft's documentation on Windows Advanced Rasterization Platform. |
| Force DirectX 11.0 feature level 10.0. |
| Force DirectX 11.0 feature level 10.1. |
| Force DirectX 11.0 feature level 11.0. |
| Force single threaded rendering. |
| Force the application to use the OpenGL core profile for rendering. The Editor tries to use the most recent OpenGL version available, and all OpenGL extensions exposed by the OpenGL drivers. Unity uses Direct3D if the platform doesn't support OpenGL. |
| Similar to |
| Make the Standalone Player use a low power device. |
| Make the Standalone Player use Metal as the default graphics API. |
| Use TextBox-based implementation for TouchScreenKeyboard. This implementation allows switching to different implementations, in case there are issues with the default. Note: This implementation has an effect only on UWP XAML applications. |
| Force the application to use Vulkan for rendering. |
| Activate experimental Wayland support when running a Linux player. |
| Specifies a file path location to which Unity writes the standalone Player log file. For more information on the default location of the log file when this argument is not provided, refer to Log files reference. To output to the console, specify Example (Windows): Example (macOS): Example (Linux): |
| Adds a detailed memory report to the Player log file when closing the Player. |
| Set the number of parallel threads Unity uses to create pipeline state objects (PSOs) when you use |
| Run Standalone Player on the specified monitor, indicated by a 1-based index number. |
| When you use this argument in batch mode, Unity doesn't initialize a graphics device. This makes it possible to run your automated workflows on machines that don't have a GPU. Note: Output logs are turned off in this mode. |
| Disables Player logging. For more information on the content and location of Player logs, refer to Log files reference folder. |
| Turn off stereo rendering. |
| Embed the Windows Standalone application into another application. When you use this argument, you need to pass the parent application's window handle (‘HWND') to the Windows Standalone application. For more information, refer to Integrate Unity into Windows applications. |
| Create the window as a dialog window, without a frame. This command isn't supported on macOS. |
| Override the default full-screen state. This must be 0 or 1. |
| Override the default screen height. This must be an integer from a supported resolution. |
| Override the default screen quality. Example usage would be: |
| Override the default screen width. This width value must be an integer from a supported resolution. |
| Run only one instance of the application at the time. If another instance is already running then launching the application again with |
| Forces the platform to use the system allocator. This can be useful if you want to use tools like address sanitizers to debug memory issues. You should only use this option for debugging purposes. |
| Prefixes every Player log message with the current timestamp and thread ID. |
| Makes the Player wait for a managed debugger to attach before launching. Generates a dialog that displays the Player's process ID. For more information on managed debugging, refer to Debug C# code in Unity. |
| Makes the Player wait for a native debugger to attach before launching. Generates a dialog that displays the Player's process ID. |
| Override full screen windowed mode. Accepted values are |
Additional resources
- Create a build from the command line
- Android Player command-line arguments
- Use Unity Accelerator on the command line
- Build for Embedded Linux from the command line
- Build for QNX from the command line
- Test Framework command-line arguments reference
- Profiler command-line arguments reference
- Run Project Auditor from the command line