'"Shader Unsupported" when starting Unity server with -batchmode -nographics flags
I am trying to make a Unity game with their new MLAPI (Mid-level networking API). I've followed this tutorial exactly without changing anything, and the game is running fine on my local (Linux) PC.
You can see there how a server instance and a client instance communicate, but both use a GUI windows, and I want to later-on run the MLAPI server on a Linux server with no GUI (headless).
I tried 2 methods (both on my local PC and my cloud server, with the same results) which both lead to the same error message:
- Run
./testbuild.x86_64 -batchmode -nographics
- Check "Server Build" in the "Build Settings" menu and run
./testbuild_server.x86_64
Initialize engine version: 2021.1.6f1 (d6fd741ee4c5)
[Subsystems] Discovering subsystems at path /home/jan/Dropbox/py/unity/ofun/janbuild/testbuild_server_Data/UnitySubsystems
Forcing GfxDevice: Null
NullGfxDevice:
Version: NULL 1.0 [1.0]
Renderer: Null Device
Vendor: Unity Technologies
Begin MonoManager ReloadAssembly
- Completed reload, in 0.083 seconds
ERROR: Shader Sprites/Default shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
ERROR: Shader Sprites/Mask shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
ERROR: Shader Legacy Shaders/VertexLit shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
WARNING: Shader Unsupported: 'Standard' - All subshaders removed
WARNING: Shader Did you use #pragma only_renderers and omit this platform?
WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
ERROR: Shader Standard shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
WARNING: Shader Unsupported: 'Standard' - All subshaders removed
WARNING: Shader Did you use #pragma only_renderers and omit this platform?
WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
ERROR: Shader GUI/Text Shader shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
UnloadTime: 0.684933 ms
ERROR: Shader UI/Default shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
I've seen some other people online use NullGfxDevice with success, so is this just an issue with Linux builds?
I tried adding the mentioned shaders in Project Settings > Always Included Shaders
, but that just led to build errors, plus UI/Default
was already included there.
Is there a way to prevent these errors or will I just have to rent a server with a GPU?
Solution 1:[1]
Ok. I wasn't able to get it to run in nographics/batch mode, but the code does run with ./testbuild.x86_64
(no flags) on the server, and I am able to connect to it from my local PC. So I can apparently just ignore the error message.
But it does run at 100% CPU, which makes me suspect it's emulating graphics on the CPU at great cost. See my other question.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |