using System.Diagnostics; using System.IO; using JetBrains.Annotations; using UnityEngine; using UnityEngine.UIElements; using Debug = UnityEngine.Debug; // This class starts and monitors the PICO-8 process, updating the UI. public class PICO8_Handler : MonoBehaviour { private enum PicoState { Inactif, Actif, Inaccessible }; private PicoState _state = PicoState.Inactif; [SerializeField] [NotNull] public string pico8ExePath; private Process _pico8 = new (); [SerializeField] private UIDocument ui; private EnumField _picoState; private Button _picoControlButton; void Start() { // Connect the UI var uiRoot = ui.rootVisualElement; _picoControlButton = uiRoot.Query