diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateCatalog.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateCatalog.cs index 6ff76767..4cc79274 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateCatalog.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskCreateCatalog.cs @@ -15,7 +15,7 @@ namespace YooAsset.Editor string buildinRootDirectory = buildParametersContext.GetBuildinRootDirectory(); string buildPackageName = buildParametersContext.Parameters.PackageName; var manifestServices = buildParametersContext.Parameters.ManifestRestoreServices; - CatalogFileHelper.CreateFile(manifestServices, buildPackageName, buildinRootDirectory); + CatalogFileTools.CreateFile(manifestServices, buildPackageName, buildinRootDirectory); // 刷新目录 AssetDatabase.Refresh(); diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskEncryption.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskEncryption.cs index bfe2dffc..051bb09f 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskEncryption.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/BaseTasks/TaskEncryption.cs @@ -24,7 +24,7 @@ namespace YooAsset.Editor string pipelineOutputDirectory = buildParametersContext.GetPipelineOutputDirectory(); foreach (var bundleInfo in buildMapContext.Collection) { - EncryptBundleInfo fileInfo = new EncryptBundleInfo(); + BundleEncryptionContext fileInfo = new BundleEncryptionContext(); fileInfo.BundleName = bundleInfo.BundleName; fileInfo.FileLoadPath = $"{pipelineOutputDirectory}/{bundleInfo.BundleName}"; var encryptResult = encryptionServices.Encrypt(fileInfo); diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/SBPBuildTasks.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/ScriptableBuildTasks.cs similarity index 100% rename from Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/SBPBuildTasks.cs rename to Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/ScriptableBuildTasks.cs diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/SBPBuildTasks.cs.meta b/Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/ScriptableBuildTasks.cs.meta similarity index 100% rename from Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/SBPBuildTasks.cs.meta rename to Assets/YooAsset/Editor/AssetBundleBuilder/BuildPipeline/ScriptableBuildPipeline/ScriptableBuildTasks.cs.meta diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryptionServices.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryptionServices.cs index 871d8738..049a2988 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryptionServices.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/DefaultEncryptionServices.cs @@ -3,7 +3,7 @@ namespace YooAsset.Editor { public class EncryptionNone : IBundleEncryptionServices { - public EncryptResult Encrypt(EncryptBundleInfo fileInfo) + public BundleEncryptionResult Encrypt(BundleEncryptionContext fileInfo) { throw new System.NotImplementedException(); } diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs index 4e3fef76..0c549e21 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/AssetBundleDebuggerWindow.cs @@ -57,7 +57,7 @@ namespace YooAsset.Editor private EViewMode _viewMode; private string _searchKeyWord; - private DebugReport _currentReport; + private DiagnosticReport _currentReport; private RemotePlayerSession _currentPlayerSession; private double _lastRepaintTime = 0; @@ -147,9 +147,9 @@ namespace YooAsset.Editor EditorConnection.instance.Initialize(); EditorConnection.instance.RegisterConnection(OnHandleConnectionEvent); EditorConnection.instance.RegisterDisconnection(OnHandleDisconnectionEvent); - EditorConnection.instance.Register(RemoteDebuggerDefine.kMsgPlayerSendToEditor, OnHandlePlayerMessage); - RemoteEditorConnection.Instance.Initialize(); - RemoteEditorConnection.Instance.Register(RemoteDebuggerDefine.kMsgPlayerSendToEditor, OnHandlePlayerMessage); + EditorConnection.instance.Register(DiagnosticSystemDefine.PlayerToEditorMessageId, OnHandlePlayerMessage); + MockEditorConnection.Instance.Initialize(); + MockEditorConnection.Instance.Register(DiagnosticSystemDefine.PlayerToEditorMessageId, OnHandlePlayerMessage); } catch (Exception e) { @@ -161,8 +161,8 @@ namespace YooAsset.Editor // 远程调试 EditorConnection.instance.UnregisterConnection(OnHandleConnectionEvent); EditorConnection.instance.UnregisterDisconnection(OnHandleDisconnectionEvent); - EditorConnection.instance.Unregister(RemoteDebuggerDefine.kMsgPlayerSendToEditor, OnHandlePlayerMessage); - RemoteEditorConnection.Instance.Unregister(RemoteDebuggerDefine.kMsgPlayerSendToEditor); + EditorConnection.instance.Unregister(DiagnosticSystemDefine.PlayerToEditorMessageId, OnHandlePlayerMessage); + MockEditorConnection.Instance.Unregister(DiagnosticSystemDefine.PlayerToEditorMessageId); _playerSessions.Clear(); } public void Update() @@ -192,11 +192,11 @@ namespace YooAsset.Editor private void OnHandlePlayerMessage(MessageEventArgs args) { int playerId = args.playerId; - var debugReport = DebugReport.Deserialize(args.data); + var debugReport = DiagnosticReport.Deserialize(args.data); - if (debugReport.DebuggerVersion != RemoteDebuggerDefine.DebuggerVersion) + if (debugReport.DebuggerVersion != DiagnosticSystemDefine.DebuggerVersion) { - Debug.LogWarning($"Debugger versions are inconsistent : {debugReport.DebuggerVersion} != {RemoteDebuggerDefine.DebuggerVersion}"); + Debug.LogWarning($"Debugger versions are inconsistent : {debugReport.DebuggerVersion} != {DiagnosticSystemDefine.DebuggerVersion}"); return; } @@ -254,23 +254,23 @@ namespace YooAsset.Editor private void OnRecordToggleValueChange(ChangeEvent evt) { // 发送采集数据的命令 - RemoteCommand command = new RemoteCommand(); - command.CommandType = (int)ERemoteCommand.SampleAuto; - command.CommandParam = evt.newValue ? "open" : "close"; - byte[] data = RemoteCommand.Serialize(command); - EditorConnection.instance.Send(RemoteDebuggerDefine.kMsgEditorSendToPlayer, data); - RemoteEditorConnection.Instance.Send(RemoteDebuggerDefine.kMsgEditorSendToPlayer, data); + RemoteDebugCommand command = new RemoteDebugCommand(); + command.CommandType = (int)EDebugCommandType.AutoSampling; + command.Parameter = evt.newValue ? "open" : "close"; + byte[] data = RemoteDebugCommand.Serialize(command); + EditorConnection.instance.Send(DiagnosticSystemDefine.EditorToPlayerMessageId, data); + MockEditorConnection.Instance.Send(DiagnosticSystemDefine.EditorToPlayerMessageId, data); } private void SampleBtn_onClick() { // 发送采集数据的命令 - RemoteCommand command = new RemoteCommand(); - command.CommandType = (int)ERemoteCommand.SampleOnce; - command.CommandParam = string.Empty; - byte[] data = RemoteCommand.Serialize(command); - EditorConnection.instance.Send(RemoteDebuggerDefine.kMsgEditorSendToPlayer, data); - RemoteEditorConnection.Instance.Send(RemoteDebuggerDefine.kMsgEditorSendToPlayer, data); + RemoteDebugCommand command = new RemoteDebugCommand(); + command.CommandType = (int)EDebugCommandType.SampleOnce; + command.Parameter = string.Empty; + byte[] data = RemoteDebugCommand.Serialize(command); + EditorConnection.instance.Send(DiagnosticSystemDefine.EditorToPlayerMessageId, data); + MockEditorConnection.Instance.Send(DiagnosticSystemDefine.EditorToPlayerMessageId, data); } private void ExportBtn_clicked() { @@ -284,16 +284,16 @@ namespace YooAsset.Editor if (resultPath != null) { // 注意:排序保证生成配置的稳定性 - foreach (var packageData in _currentReport.PackageDatas) + foreach (var packageData in _currentReport.PackageDataList) { packageData.ProviderInfos.Sort(); foreach (var providerInfo in packageData.ProviderInfos) { - providerInfo.DependBundles.Sort(); + providerInfo.DependentBundles.Sort(); } } - string filePath = $"{resultPath}/{nameof(DebugReport)}_{_currentReport.FrameCount}.json"; + string filePath = $"{resultPath}/{nameof(DiagnosticReport)}_{_currentReport.FrameCount}.json"; string fileContent = JsonUtility.ToJson(_currentReport, true); FileUtility.WriteAllText(filePath, fileContent); Debug.Log($"Debug report file saved : {filePath}"); diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/RemotePlayerSession.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/RemotePlayerSession.cs index 68a990ce..83bd1d4d 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/RemotePlayerSession.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/RemotePlayerSession.cs @@ -7,7 +7,7 @@ namespace YooAsset.Editor { internal class RemotePlayerSession { - private readonly Queue _reports = new Queue(); + private readonly Queue _reports = new Queue(); /// /// 用户ID @@ -55,7 +55,7 @@ namespace YooAsset.Editor /// /// 添加一个调试报告 /// - public void AddDebugReport(DebugReport report) + public void AddDebugReport(DiagnosticReport report) { if (report == null) Debug.LogWarning("Invalid debug report data !"); @@ -68,7 +68,7 @@ namespace YooAsset.Editor /// /// 获取调试报告 /// - public DebugReport GetDebugReport(int rangeIndex) + public DiagnosticReport GetDebugReport(int rangeIndex) { if (_reports.Count == 0) return null; diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerAssetListViewer.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerAssetListViewer.cs index c41c82a9..3339ccff 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerAssetListViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerAssetListViewer.cs @@ -13,12 +13,12 @@ namespace YooAsset.Editor { private class ProviderTableData : DefaultTableData { - public DebugPackageData PackageData; - public DebugProviderInfo ProviderInfo; + public DiagnosticPackageData PackageData; + public DiagnosticProviderInfo ProviderInfo; } private class DependTableData : DefaultTableData { - public DebugBundleInfo BundleInfo; + public DiagnosticBundleInfo BundleInfo; } private VisualTreeAsset _visualAsset; @@ -296,7 +296,7 @@ namespace YooAsset.Editor /// /// 填充页面数据 /// - public void FillViewData(DebugReport debugReport) + public void FillViewData(DiagnosticReport debugReport) { // 清空旧数据 _providerTableView.ClearAll(false, true); @@ -304,7 +304,7 @@ namespace YooAsset.Editor // 填充数据源 _sourceDatas = new List(1000); - foreach (var packageData in debugReport.PackageDatas) + foreach (var packageData in debugReport.PackageDataList) { foreach (var providerInfo in packageData.ProviderInfos) { @@ -313,10 +313,10 @@ namespace YooAsset.Editor rowData.ProviderInfo = providerInfo; rowData.AddAssetPathCell("PackageName", packageData.PackageName); rowData.AddStringValueCell("AssetPath", providerInfo.AssetPath); - rowData.AddStringValueCell("SpawnScene", providerInfo.SpawnScene); - rowData.AddStringValueCell("BeginTime", providerInfo.BeginTime); - rowData.AddLongValueCell("LoadingTime", providerInfo.LoadingTime); - rowData.AddLongValueCell("RefCount", providerInfo.RefCount); + rowData.AddStringValueCell("SpawnScene", providerInfo.OriginScene); + rowData.AddStringValueCell("BeginTime", providerInfo.StartTime); + rowData.AddLongValueCell("LoadingTime", providerInfo.ElapsedMS); + rowData.AddLongValueCell("RefCount", providerInfo.ReferenceCount); rowData.AddStringValueCell("Status", providerInfo.Status.ToString()); _sourceDatas.Add(rowData); } @@ -372,18 +372,18 @@ namespace YooAsset.Editor private void OnProviderTableViewSelectionChanged(ITableData data) { var providerTableData = data as ProviderTableData; - DebugPackageData packageData = providerTableData.PackageData; - DebugProviderInfo providerInfo = providerTableData.ProviderInfo; + DiagnosticPackageData packageData = providerTableData.PackageData; + DiagnosticProviderInfo providerInfo = providerTableData.ProviderInfo; // 填充依赖数据 - var sourceDatas = new List(providerInfo.DependBundles.Count); - foreach (var bundleName in providerInfo.DependBundles) + var sourceDatas = new List(providerInfo.DependentBundles.Count); + foreach (var bundleName in providerInfo.DependentBundles) { var dependBundleInfo = packageData.GetBundleInfo(bundleName); var rowData = new DependTableData(); rowData.BundleInfo = dependBundleInfo; rowData.AddStringValueCell("DependBundles", dependBundleInfo.BundleName); - rowData.AddLongValueCell("RefCount", dependBundleInfo.RefCount); + rowData.AddLongValueCell("RefCount", dependBundleInfo.ReferenceCount); rowData.AddStringValueCell("Status", dependBundleInfo.Status.ToString()); sourceDatas.Add(rowData); } diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerBundleListViewer.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerBundleListViewer.cs index d434e0af..b377e8c2 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerBundleListViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerBundleListViewer.cs @@ -13,16 +13,16 @@ namespace YooAsset.Editor { private class BundleTableData : DefaultTableData { - public DebugPackageData PackageData; - public DebugBundleInfo BundleInfo; + public DiagnosticPackageData PackageData; + public DiagnosticBundleInfo BundleInfo; } private class UsingTableData : DefaultTableData { - public DebugProviderInfo ProviderInfo; + public DiagnosticProviderInfo ProviderInfo; } private class ReferenceTableData : DefaultTableData { - public DebugBundleInfo BundleInfo; + public DiagnosticBundleInfo BundleInfo; } private VisualTreeAsset _visualAsset; @@ -357,7 +357,7 @@ namespace YooAsset.Editor /// /// 填充页面数据 /// - public void FillViewData(DebugReport debugReport) + public void FillViewData(DiagnosticReport debugReport) { // 清空旧数据 _bundleTableView.ClearAll(false, true); @@ -366,7 +366,7 @@ namespace YooAsset.Editor // 填充数据源 _sourceDatas = new List(1000); - foreach (var packageData in debugReport.PackageDatas) + foreach (var packageData in debugReport.PackageDataList) { foreach (var bundleInfo in packageData.BundleInfos) { @@ -375,7 +375,7 @@ namespace YooAsset.Editor rowData.BundleInfo = bundleInfo; rowData.AddAssetPathCell("PackageName", packageData.PackageName); rowData.AddStringValueCell("BundleName", bundleInfo.BundleName); - rowData.AddLongValueCell("RefCount", bundleInfo.RefCount); + rowData.AddLongValueCell("RefCount", bundleInfo.ReferenceCount); rowData.AddStringValueCell("Status", bundleInfo.Status.ToString()); _sourceDatas.Add(rowData); } @@ -443,16 +443,16 @@ namespace YooAsset.Editor var sourceDatas = new List(1000); foreach (var providerInfo in packageData.ProviderInfos) { - foreach (var dependBundleName in providerInfo.DependBundles) + foreach (var dependBundleName in providerInfo.DependentBundles) { if (dependBundleName == selectBundleInfo.BundleName) { var rowData = new UsingTableData(); rowData.ProviderInfo = providerInfo; rowData.AddStringValueCell("UsingAssets", providerInfo.AssetPath); - rowData.AddStringValueCell("SpawnScene", providerInfo.SpawnScene); - rowData.AddStringValueCell("BeginTime", providerInfo.BeginTime); - rowData.AddLongValueCell("RefCount", providerInfo.RefCount); + rowData.AddStringValueCell("SpawnScene", providerInfo.OriginScene); + rowData.AddStringValueCell("BeginTime", providerInfo.StartTime); + rowData.AddLongValueCell("RefCount", providerInfo.ReferenceCount); rowData.AddStringValueCell("Status", providerInfo.Status); sourceDatas.Add(rowData); break; @@ -466,13 +466,13 @@ namespace YooAsset.Editor // 填充ReferenceTableView { var sourceDatas = new List(1000); - foreach (string referenceBundleName in selectBundleInfo.ReferenceBundles) + foreach (string referenceBundleName in selectBundleInfo.ReferencedByBundles) { var bundleInfo = packageData.GetBundleInfo(referenceBundleName); var rowData = new ReferenceTableData(); rowData.BundleInfo = bundleInfo; rowData.AddStringValueCell("BundleName", bundleInfo.BundleName); - rowData.AddLongValueCell("RefCount", bundleInfo.RefCount); + rowData.AddLongValueCell("RefCount", bundleInfo.ReferenceCount); rowData.AddStringValueCell("Status", bundleInfo.Status.ToString()); sourceDatas.Add(rowData); } diff --git a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerOperationListViewer.cs b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerOperationListViewer.cs index 4b5aa990..7119519e 100644 --- a/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerOperationListViewer.cs +++ b/Assets/YooAsset/Editor/AssetBundleDebugger/VisualViewers/DebuggerOperationListViewer.cs @@ -13,8 +13,8 @@ namespace YooAsset.Editor { private class OperationTableData : DefaultTableData { - public DebugPackageData PackageData; - public DebugOperationInfo OperationInfo; + public DiagnosticPackageData PackageData; + public DiagnosticOperationInfo OperationInfo; } private VisualTreeAsset _visualAsset; @@ -299,7 +299,7 @@ namespace YooAsset.Editor /// /// 填充页面数据 /// - public void FillViewData(DebugReport debugReport) + public void FillViewData(DiagnosticReport debugReport) { // 清空旧数据 _operationTableView.ClearAll(false, true); @@ -308,7 +308,7 @@ namespace YooAsset.Editor // 填充数据源 _sourceDatas = new List(1000); - foreach (var packageData in debugReport.PackageDatas) + foreach (var packageData in debugReport.PackageDataList) { foreach (var operationInfo in packageData.OperationInfos) { @@ -319,8 +319,8 @@ namespace YooAsset.Editor rowData.AddStringValueCell("OperationName", operationInfo.OperationName); rowData.AddLongValueCell("Priority", operationInfo.Priority); rowData.AddDoubleValueCell("Progress", operationInfo.Progress); - rowData.AddStringValueCell("BeginTime", operationInfo.BeginTime); - rowData.AddLongValueCell("LoadingTime", operationInfo.ProcessTime); + rowData.AddStringValueCell("BeginTime", operationInfo.StartTime); + rowData.AddLongValueCell("LoadingTime", operationInfo.ElapsedMS); rowData.AddStringValueCell("Status", operationInfo.Status.ToString()); rowData.AddStringValueCell("Desc", operationInfo.OperationDesc); _sourceDatas.Add(rowData); @@ -377,8 +377,8 @@ namespace YooAsset.Editor private void OnOperationTableViewSelectionChanged(ITableData data) { var operationTableData = data as OperationTableData; - DebugPackageData packageData = operationTableData.PackageData; - DebugOperationInfo operationInfo = operationTableData.OperationInfo; + DiagnosticPackageData packageData = operationTableData.PackageData; + DiagnosticOperationInfo operationInfo = operationTableData.OperationInfo; TreeNode rootNode = new TreeNode(operationInfo); FillTreeData(operationInfo, rootNode); @@ -450,7 +450,7 @@ namespace YooAsset.Editor } private void BindTreeViewItem(VisualElement container, object userData) { - var operationInfo = (DebugOperationInfo)userData; + var operationInfo = (DiagnosticOperationInfo)userData; // OperationName { @@ -467,13 +467,13 @@ namespace YooAsset.Editor // BeginTime { var label = container.Q