Save PNG files from the Unity editor both in and out of play mode, using either a standalone render panel or camera-attached script.
- Download the package
- Import into Unity
- Open the
Tools > Vectorform > Save Game View
panel, or attachSaveCameraView
to a camera object - Set the desired settings and click
Save PNG
- 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 [archive link])
- Camera background type must be set to
- 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
- 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.
Many thanks to the original inspiration Snapscreen by Mufalder, along with code for the directory browse/reveal UI setup.
- 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