Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Capture Screenshots inside Docker Container

Discussion in 'Linux' started by exp_unity2, Jan 30, 2019.

  1. exp_unity2

    exp_unity2

    Joined:
    Jan 30, 2019
    Posts:
    1
    Hello, I am trying to capture screenshots from Unity inside a Docker container on an EC2 instance. I have come to the conclusion that it will most likely require some sort of virtual frame buffer like xvbf except that it needs OpenGL support since Unity will not start without it. My workflow has been to build the Unity executable which when run generates a set of images and text metadata files associated with each image. When run on my host machine the executable does what I want but as soon as I try to run the executable inside the Docker container things go wrong.

    I have had primarily 2 main modes of failure. The first is when I use xvfb, I get a FBConfig not found error. The second failure is when I use -batchmode and -nographics I get all the image files and reasonably looking metadata files I want however they are all grey/blank images.

    Any help trying to figure out my Unity script or a virtual frame buffer solution to this would be much appreciated!