Files
XCEngine/MVS/3DGS-Unity/Editor/Utils/CaptureScreenshot.cs

27 lines
668 B
C#
Raw Normal View History

2026-03-29 01:36:53 +08:00
// SPDX-License-Identifier: MIT
using UnityEditor;
using UnityEngine;
namespace GaussianSplatting.Editor.Utils
{
public class CaptureScreenshot : MonoBehaviour
{
[MenuItem("Tools/Gaussian Splats/Debug/Capture Screenshot %g")]
public static void CaptureShot()
{
int counter = 0;
string path;
while(true)
{
path = $"Shot-{counter:0000}.png";
if (!System.IO.File.Exists(path))
break;
++counter;
}
ScreenCapture.CaptureScreenshot(path);
Debug.Log($"Captured {path}");
}
}
}