screenshot.sa.lua 810 B

1234567891011121314151617181920
  1. ----------------------------------------------------------------------------------------------------
  2. --
  3. -- Copyright (c) Contributors to the Open 3D Engine Project.
  4. -- For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. --
  6. -- SPDX-License-Identifier: Apache-2.0 OR MIT
  7. --
  8. --
  9. --
  10. ----------------------------------------------------------------------------------------------------
  11. g_screenshotOutputFolder = '@user@/ScriptAutomation/Screenshots/'
  12. Print('Saving screenshots to ' .. ResolvePath(g_screenshotOutputFolder))
  13. ResizeViewport(800, 600)
  14. IdleFrames(100) -- wait for assets to load into the level
  15. ExecuteConsoleCommand("r_displayInfo=0")
  16. IdleFrames(1) -- wait 1 frame for the info text to hide
  17. CaptureScreenshot('ScriptAutomation_CaptureScreenshotTest.png')