#if UNITY_2019_4_OR_NEWER using System; using UnityEditor; using UnityEngine; using UnityEditor.UIElements; using UnityEngine.UIElements; namespace YooAsset.Editor { public class AssetBundleReporterWindow : EditorWindow { [MenuItem("YooAsset/AssetBundle Reporter", false, 103)] public static void OpenWindow() { AssetBundleReporterWindow window = GetWindow("AssetBundle Reporter", true, WindowsDefine.DockedWindowTypes); window.minSize = new Vector2(800, 600); } /// /// 视图模式 /// private enum EViewMode { /// /// 概览视图 /// Summary, /// /// 资源对象视图 /// AssetView, /// /// 资源包视图 /// BundleView, } private ToolbarMenu _viewModeMenu; private ReporterSummaryViewer _summaryViewer; private ReporterAssetListViewer _assetListViewer; private ReporterBundleListViewer _bundleListViewer; private EViewMode _viewMode; private BuildReport _buildReport; private string _reportFilePath; private string _searchKeyWord; public void CreateGUI() { try { VisualElement root = this.rootVisualElement; // 加载布局文件 var visualAsset = UxmlLoader.LoadWindowUXML(); if (visualAsset == null) return; visualAsset.CloneTree(root); // 导入按钮 var importBtn = root.Q