using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using nadena.dev.modular_avatar.core; using nadena.dev.modular_avatar.core.editor; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; namespace nadena.dev.modular_avatar.editor.ErrorReporting { internal class ErrorReportUI : EditorWindow { internal static Action reloadErrorReport = () => { }; [MenuItem("Tools/Modular Avatar/Show error report", false, 100)] public static void OpenErrorReportUI() { GetWindow().Show(); } public static void MaybeOpenErrorReportUI() { if (Application.isBatchMode) return; // headless unit tests if (BuildReport.CurrentReport.Avatars.Any(av => av.logs.Count > 0)) { OpenErrorReportUI(); } } private Vector2 _avatarScrollPos, _errorScrollPos; private int _selectedAvatar = -1; private List