- Home /
Set which GPU Unity game runs on
Is there any way to select which graphics card a Unity game will run on? I have a PC with two NVidia cards, and it always defaults to the slower one. In DirectX 9 I could use the "-adapter" command line on the game to set a GPU, but that doesn't seem to work in DirectX 11 or DirectX 12.
Answer by teaspoon · Oct 29, 2019 at 03:54 PM
You can use the command line argument -gpu # to select the gpu. I think adapter means which monitor the app starts on. app.exe -gpu 1
Can you link to docs stating that or have you tried it yourself? It doesn't seem to be in the Unity command line arg docs: https://docs.unity3d.com/$$anonymous$$anual/CommandLineArguments.html
I use the command line argument to test our app my integrated and dedicated GPUs. I found the flag in forum post. It doesn't appear it in the docs. I think it was introduced in version 5.6. Just run your app from the command line and try: unityApp.exe -gpu 0 or you can launch the unity Editor the same way editor.exe -gpu 1 If you launch the editor that way you can see the "Device Properties" in the output window. our you can list the GPU with some SystemInfo https://docs.unity3d.com/ScriptReference/SystemInfo.html
Try difference gpus 0..3 You can see w