using UnityEditor; using UnityEngine; using UnityEngine.UIElements; using UnityEngine.Networking; using System.Reflection; using System.Linq; #nullable enable namespace Yarn.Unity.Editor { public class YarnSpinnerEditorWindow : EditorWindow { static UnityWebRequest? supportersRequest; static string supportersList = string.Empty; [SerializeField] private VisualTreeAsset? m_VisualTreeAsset = default; [InitializeOnLoadMethod] internal static void TryShowingWindowOnLoad() { EditorApplication.delayCall += () => { // do a check to see if it is time to show if (ShouldShowAboutPage()) { ShowAbout(); } }; } [MenuItem("Window/Yarn Spinner/About Yarn Spinner... %#y", false, 2000)] public static void ShowAbout() { YarnSpinnerEditorWindow window = GetWindow(true, "About Yarn Spinner", true); window.minSize = new Vector2(512, 768); window.maxSize = window.minSize; window.Show(); } public void CreateGUI() { // Each editor window contains a root VisualElement object VisualElement root = rootVisualElement; if (m_VisualTreeAsset == null) { Debug.LogError("Unable to load the UXML file for the About Window"); return; } // Instantiate UXML VisualElement labelFromUXML = m_VisualTreeAsset.Instantiate(); root.Add(labelFromUXML); // ok so will need to get lots of different pieces // core version, compiler version, unity version var coreLabel = root.Q