I need my unity game to produce frames while in batchmode.
For context, we need to send the game frames to another process.
I can't get much documentation on batchmode, but it seems that the Player Loop in batchmode doesn't include the rendering part. I tried calling Camera.main.Render() in a LateUpdate method, but it still doesn't work.
On Windows, the game crashes.
On MacOS, I get an assertion failed AGX: Texture read/write assertion failed: (xoffset + width) <= ALIGNGRAN_NPOT(getViewLevelWidth(mipmapLevel), block_width) && "Region width OOB" when calling:
var grab = new RenderTexture(w, h, 0);
ScreenCapture.CaptureScreenshotIntoRenderTexture(grab);
We're running unity 2021.3.6f1 with HDRP rendering.