Skip to content

Instantly share code, notes, and snippets.

@haosizheng
haosizheng / ImageSequenceRecorderWithTransparentBackground.cs
Last active April 14, 2024 14:10 — forked from bitbutter/TransparentBackgroundScreenshotRecorder.cs
Save image sequence in Unity with transparent background.
using UnityEngine;
using System.Collections;
using System.IO;
using UnityEngine.Rendering.Universal;
/*
Usage:
1. Attach this script to your chosen camera's game object.
2. Set that camera's Clear Flags field to Solid Color.
3. Use the inspector to set frameRate and framesToCapture