https://github.com/jeinselen/unity-savegameview
Unity scripts to capture the current game view with alpha channel, usable in both edit and play mode.
https://github.com/jeinselen/unity-savegameview
capture export game png render rendering save screenshot unity unity3d view
Last synced: 4 months ago
JSON representation
Unity scripts to capture the current game view with alpha channel, usable in both edit and play mode.
- Host: GitHub
- URL: https://github.com/jeinselen/unity-savegameview
- Owner: jeinselen
- License: gpl-3.0
- Created: 2023-05-24T22:07:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-05T18:20:21.000Z (over 1 year ago)
- Last Synced: 2025-02-18T12:05:42.038Z (over 1 year ago)
- Topics: capture, export, game, png, render, rendering, save, screenshot, unity, unity3d, view
- Language: C#
- Homepage:
- Size: 94.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unity Save Game View
Save PNG files from the Unity editor both in and out of play mode, using either a standalone render panel or camera-attached script.

## Installation
- Download the package
- Import into Unity
- Open the `Tools > Vectorform > Save Game View` panel, or attach `SaveCameraView` to a camera object
- Set the desired settings and click `Save PNG`
## Features
- Capture the game view in the editor without entering play mode
- Can be used as a UI panel or as a script attached to a camera
- Save PNG images with alpha, with two setup requirements:
- Camera background type must be set to `Solid Color` using black with 0% alpha
- Post processing must be disabled or modified to maintain alpha ([URP doesn't by default](https://forum.unity.com/threads/transparent-rendertexture-with-postprocessing.1265873/) [[archive link](https://web.archive.org/web/20231109115119/https://forum.unity.com/threads/transparent-rendertexture-with-postprocessing.1265873/)])
- Use dynamic variables in the file name for automated outputs
- `{scene}` = the name of the currently open scene
- `{camera}` = the name of the first active camera (SaveGameView) or attached camera (SaveCameraView)
- `{samples}` = the selected multi-sampling level
- `{date}` = the current date in YYYY-MM-DD format
- `{time}` = the current time in HH-MM-SS.F format
## Debugging
- If you get the error "no active camera found in the scene view" even though an active camera exists, make sure it's tagged as "mainCamera" in the Inspector.
## Credits
Many thanks to the original inspiration [Snapscreen by Mufalder](https://github.com/Mufalder/unity-snapscreen), along with code for the directory browse/reveal UI setup.
## Notes
- Basic testing performed in Unity 2021.3, 2022.1, and Unity 6; should work in other versions
- Does not work with TSAA, since the render target is created/destroyed in a single frame
- This was developed by a member of the design department as an internal tool; no warranty is provided, use at your own risk