A clean start for the shared repository: the Unity project (Assets, Packages, ProjectSettings), ArtSource, Docs and Tools as they stood at f3666f0 in the old local repository, with its generated prefabs and scene brought up to date. Images, audio, models and binaries go through Git LFS (.gitattributes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
748 B
C#
20 lines
748 B
C#
using UnityEngine;
|
|
|
|
namespace GrassCutter
|
|
{
|
|
/// <summary>Dev helper: `-screenshot out.png [-shotdelay 6] [-autohost]` captures a frame and quits (used for automated checks).</summary>
|
|
public class AutoScreenshot : MonoBehaviour
|
|
{
|
|
public string path;
|
|
System.Collections.IEnumerator Start()
|
|
{
|
|
float delay = float.TryParse(CommandLine.Get("-shotdelay", "6"), out var d) ? d : 6f;
|
|
if (CommandLine.Has("-autohost")) { yield return new WaitForSeconds(1.5f); NetSession.Instance.HostLocal(); }
|
|
yield return new WaitForSeconds(delay);
|
|
yield return BotCapture.Shot(path);
|
|
yield return new WaitForSeconds(0.5f);
|
|
Application.Quit();
|
|
}
|
|
}
|
|
}
|