using Lights; using System.Threading; using UnityEngine; public class GameManager : MonoBehaviour { public static CancellationTokenSource globalCts { get; private set; } public void Init() { globalCts = new CancellationTokenSource(); } private void LateUpdate() { In.ResetFrameData(); } private void OnApplicationQuit() { Debug.Log("EXITING"); LightSystem.SetLightActive(false); LightSystem.SetAllIndicators(0); ComPortController.Shutdown(); globalCts?.Cancel(); } }