Possible fix:
Change engine.getRenderWidth = originalGetRenderWidth; to delete engine.getRenderWidth and the same height, but it generates typescript errors. Reflect.deleteProperty(engine, 'getRenderWidth'); does not trigger ts error.
Or maybe override the getRenderWidth function only before scene.render.
And the function name seems too long for discourse
cc @sebavan, but I think it’s simply not supported because we change the state of the engine when we take the screenshot. You should just wait until the first screenshot is complete before taking the second one.
They are all changing the state of the engine, which happens on the same thread (plus, I’m not sure there’s a need to concurrently run CreateScreenshot and CreateScreenshotUsingRenderTarget - the Async variants are really the same functions, only that they return a Promise).