using System.Collections; using System.Collections.Generic; using System.Diagnostics; using UnityEngine; public class AuthKeep : MonoBehaviour { void Start() { StartCoroutine("ProtectAuth"); } IEnumerator ProtectAuth() { while (true) { yield return new WaitForSeconds(30); var process = Process.GetProcessesByName("LGZNProtect"); if (process.Length < 1) { // Application.Quit(); } } } private void OnApplicationQuit() { var process = Process.GetProcessesByName("LGZNProtect"); foreach (var pro in process) pro.Kill(); } }