using UnityEngine; namespace GrassCutter { /// Scene entry point: warms up singletons and configures physics layers. public class GameBoot : MonoBehaviour { void Awake() { Application.targetFrameRate = -1; Layers.SetupCollisions(); Fx.Warmup(); _ = Sfx.I; GameSettings.Apply(); if (CommandLine.Has("-resetsave")) { TeamState.DeleteSave(); Debug.Log("[Boot] save reset"); } foreach (var d in UnityEngine.InputSystem.InputSystem.devices) Debug.Log($"[Input] device: {d.name} ({d.layout}) {d.description.product}"); } void Start() { // dev bots render off-screen so they can run with -batchmode without touching the user's desktop if (CommandLine.Has("-screenshot") || CommandLine.Has("-autodemo")) BotCapture.Setup(int.TryParse(CommandLine.Get("-shotw", "1600"), out var w) ? w : 1600, int.TryParse(CommandLine.Get("-shoth", "900"), out var h) ? h : 900); if (CommandLine.Get("-screenshot") is string path) gameObject.AddComponent().path = path; if (CommandLine.Get("-autodemo") is string demo) gameObject.AddComponent().folder = demo; } } }