diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs index 3886641..b1e9d05 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs @@ -1,144 +1,216 @@ #if UNITY_2019_4_OR_NEWER using System; +using System.Collections.Generic; using UnityEditor; using UnityEngine; using UnityEngine.UIElements; using UnityEditor.UIElements; +using UnityEditor.Networking.PlayerConnection; +using UnityEngine.Networking.PlayerConnection; namespace YooAsset.Editor { - public class AssetBundleDebuggerWindow : EditorWindow - { - [MenuItem("YooAsset/AssetBundle Debugger", false, 104)] - public static void ShowExample() - { - AssetBundleDebuggerWindow wnd = GetWindow("资源包调试工具", true, EditorDefine.DockedWindowTypes); - wnd.minSize = new Vector2(800, 600); - } + public class AssetBundleDebuggerWindow : EditorWindow + { + [MenuItem("YooAsset/AssetBundle Debugger", false, 104)] + public static void ShowExample() + { + AssetBundleDebuggerWindow wnd = GetWindow("资源包调试工具", true, EditorDefine.DockedWindowTypes); + wnd.minSize = new Vector2(800, 600); + } - /// - /// 视图模式 - /// - private enum EViewMode - { - /// - /// 内存视图 - /// - MemoryView, + /// + /// 视图模式 + /// + private enum EViewMode + { + /// + /// 内存视图 + /// + MemoryView, - /// - /// 资源对象视图 - /// - AssetView, + /// + /// 资源对象视图 + /// + AssetView, - /// - /// 资源包视图 - /// - BundleView, - } - - private ToolbarMenu _viewModeMenu; - private DebuggerAssetListViewer _assetListViewer; - private DebuggerBundleListViewer _bundleListViewer; - - private EViewMode _viewMode; - private readonly DebugReport _debugReport = new DebugReport(); - private string _searchKeyWord; + /// + /// 资源包视图 + /// + BundleView, + } - public void CreateGUI() - { + private readonly Dictionary _playerSessions = new Dictionary(); + + private ToolbarMenu _viewModeMenu; + private DebuggerAssetListViewer _assetListViewer; + private DebuggerBundleListViewer _bundleListViewer; + + private EViewMode _viewMode; + private DebugReport _debugReport; + private string _searchKeyWord; + + + public void CreateGUI() + { try { - VisualElement root = rootVisualElement; + VisualElement root = rootVisualElement; - // 加载布局文件 - var visualAsset = EditorHelper.LoadWindowUXML(); - if (visualAsset == null) - return; - - visualAsset.CloneTree(root); + // 加载布局文件 + var visualAsset = EditorHelper.LoadWindowUXML(); + if (visualAsset == null) + return; - // 采样按钮 - var sampleBtn = root.Q