Game View capture (including Screen Space - Overlay UI) and screenshot abilities for AI agents.
- Unity 2021.3+
- com.lambda-labs.unity-repl 0.1.0+
Add both packages to your project's Packages/manifest.json:
{
"dependencies": {
"com.lambda-labs.unity-repl": "https://github.com/LambdaLabsHQ/unity-repl.git",
"com.lambda-labs.unity-agent-vision": "https://github.com/LambdaLabsHQ/unity-agent-vision.git"
}
}// Capture Game View with Overlay UI (HUD, health bars, etc.)
var result = LambdaLabs.UnityAgentVision.GameViewCaptureAbility.CaptureToFile("my_shot");
// Runtime screenshot (no overlay UI, works in Edit Mode too)
var result = LambdaLabs.UnityAgentVision.ScreenshotAbility.CaptureToFile("shot", superSize: 1);Unity's Camera.Render() produces a pure 3D render — no Screen Space Overlay UI.
GameViewCaptureAbility reads GameView's internal m_RenderTexture (via reflection)
which includes the fully composited output with HUD.
This package is part of the Unity REPL project and is licensed under the GNU Affero General Public License v3.0.