chore: sync workspace state
This commit is contained in:
26
MVS/3DGS-Unity/Editor/Utils/CaptureScreenshot.cs
Normal file
26
MVS/3DGS-Unity/Editor/Utils/CaptureScreenshot.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
// 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}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user