using UnityEngine; namespace GrassCutter { /// Dev helper: `-screenshot out.png [-shotdelay 6] [-autohost]` captures a frame and quits (used for automated checks). 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(); } } }