I tried to dockerlize the sample in this project, but it failed to work.
I deployed the sample in a pod, within 2 containers, one is unity demo, another is webserver. The network is fine, I can access from browser, but:
Browser screen is like:
Unity log shows:
<I> Failed to get cursor position:
This operation requires an interactive window station
It seems that Unity play can’t run on server without GUI/displayer.
I tried to use batchmode. Unity log seems to be normal, but browser screen is still black.
What should I do to run this in docker?
Could you check these issues? I think they had same your issue.
opened 10:13PM - 08 Jul 21 UTC
closed 02:29AM - 24 May 22 UTC
bug
stabled
Hi, I need to be able to render multiple games stored in a headless server that … I can connect via a web. For every game I have up to two video streaming tracks, as well as up to two input streams to control characters in the game.
One issue is that, when I start running more than 2 games in the server, the video streaming stops working, even though the input stream still allows me to control characters. If I run multiple games locally this issue does not arise, and I can stream multiple games at the same time. I wanted to check if there is any way I can increase the number of concurrent games, and what would be the best way to do so. I currently have a machine with 8 GeForce GTX 1080 gpus, but I still cannot stream more than 3 tracks at the same time.
From [this documentation ](https://docs.unity3d.com/Packages/com.unity.webrtc@2.0/manual/en/videostreaming.html) it seems like hardware encoding limits the number of concurrent streams, but software encoding does not seem to work on a headless server. If it is not possible to have multiple streams in a given server, would it make sense to simply send a static image from a camera every time a user takes an action? What would be the best approach?
opened 10:57AM - 11 Jan 22 UTC
closed 02:56AM - 08 Feb 22 UTC
enhancement
stabled
**Is your feature request related to a problem? Please describe.**
I want to ru… n the unity player on a server (or even a docker container), which doesn't have a display / desktop. (e.g. Ubuntu server).
And broadcast the rendered stream to clients through WebRTC.
**Describe the solution you'd like**
I tried to run the Unity standalone player on a Linux server without a display/desktop, but it failed to start.
Even I installed the x11-xserver-utils, it still reported error "Error: Can't open display: :0"
**Describe alternatives you've considered**
I also tried the server build of Unity standalone player, but looks it then didn't do any rendering.
Is there a way to still do rendering with a server build?
Unity.WebRTC must run with Rendering. (not batchmode)
sunxia
October 19, 2022, 9:38am
3
I have a similar problem , I can run RenderStreaming standalone game with -batchmode on Windows desktop, Windows container, and Ubuntu Desktop, but failed to get it work inside ubuntu container. There seems to be something wrong with headless logic.
Do you have any idea? Many thanks!
sunxia:
I have a similar problem , I can run RenderStreaming standalone game with -batchmode on Windows desktop, Windows container, and Ubuntu Desktop, but failed to get it work inside ubuntu container. There seems to be something wrong with headless logic.
Do you have any idea? Many thanks!
I can run the sample in linux container.
You can refer to this article: https://zhuanlan.zhihu.com/p/521023922
If you have any questions, please PM me in zhihu. I’m also curious about you getting it running on Windows.