diff --git a/Assets/HotfixCollector/AOTDlls/UniTask.dll.bytes b/Assets/HotfixCollector/AOTDlls/UniTask.dll.bytes index ba2f6928..23698030 100644 Binary files a/Assets/HotfixCollector/AOTDlls/UniTask.dll.bytes and b/Assets/HotfixCollector/AOTDlls/UniTask.dll.bytes differ diff --git a/Assets/HotfixCollector/AOTDlls/mscorlib.dll.bytes b/Assets/HotfixCollector/AOTDlls/mscorlib.dll.bytes index c45d2e6c..5491e3a0 100644 Binary files a/Assets/HotfixCollector/AOTDlls/mscorlib.dll.bytes and b/Assets/HotfixCollector/AOTDlls/mscorlib.dll.bytes differ diff --git a/Assets/HotfixCollector/HotfixDlls/HotfixerDemo.Hotfix.Runtime.dll.bytes b/Assets/HotfixCollector/HotfixDlls/HotfixerDemo.Hotfix.Runtime.dll.bytes index ca4d447b..fe5660e6 100644 Binary files a/Assets/HotfixCollector/HotfixDlls/HotfixerDemo.Hotfix.Runtime.dll.bytes and b/Assets/HotfixCollector/HotfixDlls/HotfixerDemo.Hotfix.Runtime.dll.bytes differ diff --git a/Assets/HybridCLRData/Generated/AOTGenericReferences.cs b/Assets/HybridCLRData/Generated/AOTGenericReferences.cs index 4986beb9..30db163a 100644 --- a/Assets/HybridCLRData/Generated/AOTGenericReferences.cs +++ b/Assets/HybridCLRData/Generated/AOTGenericReferences.cs @@ -16,13 +16,119 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour // }} // {{ AOT generic types + // Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder + // Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoid.<>cc__DisplayClass4_0.<b__0>d> + // Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidc__DisplayClass4_0.<b__0>d> + // Cysharp.Threading.Tasks.CompilerServices.IStateMachineRunnerPromise + // Cysharp.Threading.Tasks.ITaskPoolNode + // Cysharp.Threading.Tasks.IUniTaskSource>>>>>>>>> + // Cysharp.Threading.Tasks.IUniTaskSource>>>>>>>> + // Cysharp.Threading.Tasks.IUniTaskSource>>>>>>> + // Cysharp.Threading.Tasks.IUniTaskSource>>>>>> + // Cysharp.Threading.Tasks.IUniTaskSource>>>>> + // Cysharp.Threading.Tasks.IUniTaskSource>>>> + // Cysharp.Threading.Tasks.IUniTaskSource>>> + // Cysharp.Threading.Tasks.IUniTaskSource>> + // Cysharp.Threading.Tasks.IUniTaskSource> + // Cysharp.Threading.Tasks.IUniTaskSource + // Cysharp.Threading.Tasks.TaskPool + // Cysharp.Threading.Tasks.UniTask.Awaiter>>>>>>>>> + // Cysharp.Threading.Tasks.UniTask.Awaiter>>>>>>>> + // Cysharp.Threading.Tasks.UniTask.Awaiter>>>>>>> + // Cysharp.Threading.Tasks.UniTask.Awaiter>>>>>> + // Cysharp.Threading.Tasks.UniTask.Awaiter>>>>> + // Cysharp.Threading.Tasks.UniTask.Awaiter>>>> + // Cysharp.Threading.Tasks.UniTask.Awaiter>>> + // Cysharp.Threading.Tasks.UniTask.Awaiter>> + // Cysharp.Threading.Tasks.UniTask.Awaiter> // Cysharp.Threading.Tasks.UniTask.Awaiter + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource>>>>>>>>> + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource>>>>>>>> + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource>>>>>>> + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource>>>>>> + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource>>>>> + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource>>>> + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource>>> + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource>> + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource> + // Cysharp.Threading.Tasks.UniTask.IsCanceledSource + // Cysharp.Threading.Tasks.UniTask.MemoizeSource>>>>>>>>> + // Cysharp.Threading.Tasks.UniTask.MemoizeSource>>>>>>>> + // Cysharp.Threading.Tasks.UniTask.MemoizeSource>>>>>>> + // Cysharp.Threading.Tasks.UniTask.MemoizeSource>>>>>> + // Cysharp.Threading.Tasks.UniTask.MemoizeSource>>>>> + // Cysharp.Threading.Tasks.UniTask.MemoizeSource>>>> + // Cysharp.Threading.Tasks.UniTask.MemoizeSource>>> + // Cysharp.Threading.Tasks.UniTask.MemoizeSource>> + // Cysharp.Threading.Tasks.UniTask.MemoizeSource> + // Cysharp.Threading.Tasks.UniTask.MemoizeSource + // Cysharp.Threading.Tasks.UniTask>>>>>>>>>> + // Cysharp.Threading.Tasks.UniTask>>>>>>>>> + // Cysharp.Threading.Tasks.UniTask>>>>>>>> + // Cysharp.Threading.Tasks.UniTask>>>>>>> + // Cysharp.Threading.Tasks.UniTask>>>>>> + // Cysharp.Threading.Tasks.UniTask>>>>> + // Cysharp.Threading.Tasks.UniTask>>>> + // Cysharp.Threading.Tasks.UniTask>>> + // Cysharp.Threading.Tasks.UniTask>> + // Cysharp.Threading.Tasks.UniTask> // Cysharp.Threading.Tasks.UniTask + // System.Action + // System.Collections.Generic.Comparer>>>>>>>> + // System.Collections.Generic.Comparer>>>>>>> + // System.Collections.Generic.Comparer>>>>>> + // System.Collections.Generic.Comparer>>>>> + // System.Collections.Generic.Comparer>>>> + // System.Collections.Generic.Comparer>>> + // System.Collections.Generic.Comparer>> + // System.Collections.Generic.Comparer> + // System.Collections.Generic.Comparer + // System.Collections.Generic.Comparer + // System.Collections.Generic.EqualityComparer>>>>>>>> + // System.Collections.Generic.EqualityComparer>>>>>>> + // System.Collections.Generic.EqualityComparer>>>>>> + // System.Collections.Generic.EqualityComparer>>>>> + // System.Collections.Generic.EqualityComparer>>>> + // System.Collections.Generic.EqualityComparer>>> + // System.Collections.Generic.EqualityComparer>> + // System.Collections.Generic.EqualityComparer> + // System.Collections.Generic.EqualityComparer + // System.Collections.Generic.EqualityComparer + // System.Collections.Generic.ObjectComparer>>>>>>> + // System.Collections.Generic.ObjectComparer>>>>>> + // System.Collections.Generic.ObjectComparer>>>>> + // System.Collections.Generic.ObjectComparer>>>> + // System.Collections.Generic.ObjectComparer>>> + // System.Collections.Generic.ObjectComparer>> + // System.Collections.Generic.ObjectComparer> + // System.Collections.Generic.ObjectComparer + // System.Collections.Generic.ObjectComparer + // System.Collections.Generic.ObjectEqualityComparer>>>>>>> + // System.Collections.Generic.ObjectEqualityComparer>>>>>> + // System.Collections.Generic.ObjectEqualityComparer>>>>> + // System.Collections.Generic.ObjectEqualityComparer>>>> + // System.Collections.Generic.ObjectEqualityComparer>>> + // System.Collections.Generic.ObjectEqualityComparer>> + // System.Collections.Generic.ObjectEqualityComparer> + // System.Collections.Generic.ObjectEqualityComparer + // System.Collections.Generic.ObjectEqualityComparer // System.Func + // System.Func + // System.ValueTuple>>>>>>>>> + // System.ValueTuple>>>>>>>> + // System.ValueTuple>>>>>>> + // System.ValueTuple>>>>>> + // System.ValueTuple>>>>> + // System.ValueTuple>>>> + // System.ValueTuple>>> + // System.ValueTuple>> + // System.ValueTuple> + // System.ValueTuple // }} public void RefMethods() { + // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskMethodBuilder.Startd__39>(OxGFrame.AssetLoader.AssetLoaders.d__39&) // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder.AwaitUnsafeOnCompleted,HotfixTester.<>c__DisplayClass4_0.<b__0>d>(Cysharp.Threading.Tasks.UniTask.Awaiter&,HotfixTester.<>c__DisplayClass4_0.<b__0>d&) // System.Void Cysharp.Threading.Tasks.CompilerServices.AsyncUniTaskVoidMethodBuilder.Startc__DisplayClass4_0.<b__0>d>(HotfixTester.<>c__DisplayClass4_0.<b__0>d&) // Cysharp.Threading.Tasks.UniTask OxGFrame.AssetLoader.AssetLoaders.InstantiateAssetAsync(string,OxGFrame.AssetLoader.Progression) diff --git a/Assets/LoggerSetting.asset b/Assets/LoggerSetting.asset new file mode 100644 index 00000000..c0908060 --- /dev/null +++ b/Assets/LoggerSetting.asset @@ -0,0 +1,31 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0db32b67c3968d44c892c0d4cff28f39, type: 3} + m_Name: LoggerSetting + m_EditorClassIdentifier: + logMainActive: 1 + loggerConfigs: + - loggerName: OxGFrame.GSIFrame.Logger + logActive: 1 + - loggerName: OxGFrame.MediaFrame.Logger + logActive: 1 + - loggerName: OxGFrame.AssetLoader.Logger + logActive: 1 + - loggerName: OxGFrame.AgencyCenter.Logger + logActive: 1 + - loggerName: OxGFrame.CoreFrame.Logger + logActive: 1 + - loggerName: OxGFrame.NetFrame.Logger + logActive: 1 + - loggerName: OxGFrame.Hotfixer.Logger + logActive: 1 + resetLoggers: 0 diff --git a/Assets/LoggerSetting.asset.meta b/Assets/LoggerSetting.asset.meta new file mode 100644 index 00000000..cfaca494 --- /dev/null +++ b/Assets/LoggerSetting.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5da283a6b7cd22541b223391f5745ee2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/APICenter/Acax/Acax.cs b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/APICenter/Acax/Acax.cs index 03b11f01..3fdf119a 100644 --- a/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/APICenter/Acax/Acax.cs +++ b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/APICenter/Acax/Acax.cs @@ -10,7 +10,7 @@ public static class Http public delegate void ResponseHandle(string response); /// - /// Synchronous C# and Xml = Acax + /// Callback C# and Xml = Acax /// /// /// @@ -25,7 +25,7 @@ public static void Acax(string url, string method, string[,] headers, object[,] } /// - /// Asynchronous C# and Xml = Acax + /// Asynchronous with Callback C# and Xml = Acax /// /// /// diff --git a/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Common/CenterBase.cs b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Common/CenterBase.cs index df8d7180..efb54c61 100644 --- a/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Common/CenterBase.cs +++ b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Common/CenterBase.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using OxGKit.LoggingSystem; +using System.Collections.Generic; using UnityEngine; namespace OxGFrame.AgencyCenter @@ -47,6 +48,11 @@ public static void Delete(int id) GetInstance().Remove(id); } + public static void DeleteAll() + { + GetInstance().RemoveAll(); + } + public static UClass Find() where UClass : TClass { return GetInstance().Get(); @@ -105,7 +111,7 @@ public void Register(int id, TClass @class) { if (this.HasInCache(id)) { - Debug.Log(string.Format("Repeat registration. Id: {0}, Reg: {1}", id, @class.GetType().Name)); + Logging.Print(string.Format("Repeat registration. Id: {0}, Reg: {1}", id, @class.GetType().Name)); return; } @@ -128,11 +134,16 @@ public void Remove(int id) } } + public void RemoveAll() + { + if (this._cache.Count > 0) this._cache.Clear(); + } + protected TClass GetFromCache(int id) { if (!this.HasInCache(id)) { - Debug.Log(string.Format("Cannot found. Id: {0}", id)); + Logging.Print(string.Format("Cannot found. Id: {0}", id)); return default; } diff --git a/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Logger.cs b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Logger.cs new file mode 100644 index 00000000..7b4f06b7 --- /dev/null +++ b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Logger.cs @@ -0,0 +1,7 @@ +using OxGKit.LoggingSystem; + +namespace OxGFrame.AgencyCenter +{ + [LoggerName("OxGFrame.AgencyCenter.Logger")] + public class Logger : Logging { } +} \ No newline at end of file diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/FixBuildTasks.cs.meta b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Logger.cs.meta similarity index 83% rename from Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/FixBuildTasks.cs.meta rename to Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Logger.cs.meta index 5b0f65c2..475fd694 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/FixBuildTasks.cs.meta +++ b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/Logger.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 733573ca77c26534c99bd4c57a30b34f +guid: cc7f01966652fee4f92931bfe869b5f4 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/OxGFrame.AgencyCenter.Runtime.asmdef b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/OxGFrame.AgencyCenter.Runtime.asmdef index c7342d6b..4714c4d6 100644 --- a/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/OxGFrame.AgencyCenter.Runtime.asmdef +++ b/Assets/OxGFrame/AgencyCenter/Scripts/Runtime/OxGFrame.AgencyCenter.Runtime.asmdef @@ -3,7 +3,8 @@ "rootNamespace": "", "references": [ "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:e34a5702dd353724aa315fb8011f08c3" + "GUID:e34a5702dd353724aa315fb8011f08c3", + "GUID:981f0bbbcbf62b74c9821862b0cd0202" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/BundleCryptogramUtilityWindow.cs b/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/BundleCryptogramUtilityWindow.cs index 2bbeb672..75af2f0e 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/BundleCryptogramUtilityWindow.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/BundleCryptogramUtilityWindow.cs @@ -31,7 +31,7 @@ internal static BundleCryptogramUtilityWindow GetInstance() [SerializeField] public string sourceFolder; - private CryptogramSetting _settings; + private CryptogramSetting _setting; internal static string PROJECT_PATH; internal static string KEY_SAVER; @@ -52,7 +52,7 @@ public static void ShowWindow() private void OnEnable() { - this._settings = EditorTool.LoadSettingData(); + this._setting = EditorTool.LoadSettingData(); this._LoadSettingsData(); this.sourceFolder = EditorStorage.GetData(KEY_SAVER, $"sourceFolder", Path.Combine($"{Application.dataPath}/", AssetBundleBuilderHelper.GetDefaultBuildOutputRoot())); this.cryptogramType = (CryptogramType)Convert.ToInt32(EditorStorage.GetData(KEY_SAVER, "cryptogramType", "0")); @@ -60,14 +60,14 @@ private void OnEnable() private void _LoadSettingsData() { - this.randomSeed = this._settings.randomSeed; - this.dummySize = this._settings.dummySize; - this.xorKey = this._settings.xorKey; - this.hXorKey = this._settings.hXorKey; - this.tXorKey = this._settings.tXorKey; - this.jXorKey = this._settings.jXorKey; - this.aesKey = this._settings.aesKey; - this.aesIv = this._settings.aesIv; + this.randomSeed = this._setting.randomSeed; + this.dummySize = this._setting.dummySize; + this.xorKey = this._setting.xorKey; + this.hXorKey = this._setting.hXorKey; + this.tXorKey = this._setting.tXorKey; + this.jXorKey = this._setting.jXorKey; + this.aesKey = this._setting.aesKey; + this.aesIv = this._setting.aesIv; } private void OnDisable() diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/CryptogramSettingWindow.cs b/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/CryptogramSettingWindow.cs index d4d3f3fc..171d1f4a 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/CryptogramSettingWindow.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/EditorWindow/CryptogramSettingWindow.cs @@ -25,7 +25,7 @@ internal static CryptogramSettingWindow GetInstance() [SerializeField] public CryptogramType cryptogramType; - private CryptogramSetting _settings; + private CryptogramSetting _setting; private bool _isDirty = false; internal static string PROJECT_PATH; @@ -48,7 +48,7 @@ public static void ShowWindow() private void OnEnable() { this._isDirty = false; - this._settings = EditorTool.LoadSettingData(); + this._setting = EditorTool.LoadSettingData(); this._LoadSettingsData(); this.cryptogramType = (CryptogramType)Convert.ToInt32(EditorStorage.GetData(KEY_SAVER, "cryptogramType", "0")); } @@ -74,14 +74,14 @@ private void OnGUI() private void _LoadSettingsData() { - this.randomSeed = this._settings.randomSeed; - this.dummySize = this._settings.dummySize; - this.xorKey = this._settings.xorKey; - this.hXorKey = this._settings.hXorKey; - this.tXorKey = this._settings.tXorKey; - this.jXorKey = this._settings.jXorKey; - this.aesKey = this._settings.aesKey; - this.aesIv = this._settings.aesIv; + this.randomSeed = this._setting.randomSeed; + this.dummySize = this._setting.dummySize; + this.xorKey = this._setting.xorKey; + this.hXorKey = this._setting.hXorKey; + this.tXorKey = this._setting.tXorKey; + this.jXorKey = this._setting.jXorKey; + this.aesKey = this._setting.aesKey; + this.aesIv = this._setting.aesIv; } private void _CryptogramType(CryptogramType cryptogramType) @@ -259,31 +259,31 @@ private void _SaveData(CryptogramType cryptogramType, bool isShowDialog = false) switch (cryptogramType) { case CryptogramType.OFFSET: - this._settings.randomSeed = this.randomSeed; - this._settings.dummySize = this.dummySize; + this._setting.randomSeed = this.randomSeed; + this._setting.dummySize = this.dummySize; this._isDirty = false; - EditorUtility.SetDirty(this._settings); + EditorUtility.SetDirty(this._setting); AssetDatabase.SaveAssets(); if (isShowDialog) EditorUtility.DisplayDialog("Crytogram Message", "Saved [OFFSET] Setting.", "OK"); break; case CryptogramType.XOR: - this._settings.xorKey = (byte)this.xorKey; + this._setting.xorKey = (byte)this.xorKey; this._isDirty = false; - EditorUtility.SetDirty(this._settings); + EditorUtility.SetDirty(this._setting); AssetDatabase.SaveAssets(); if (isShowDialog) EditorUtility.DisplayDialog("Crytogram Message", "Saved [XOR] Setting.", "OK"); break; case CryptogramType.HT2XOR: - this._settings.hXorKey = (byte)this.hXorKey; - this._settings.tXorKey = (byte)this.tXorKey; - this._settings.jXorKey = (byte)this.jXorKey; + this._setting.hXorKey = (byte)this.hXorKey; + this._setting.tXorKey = (byte)this.tXorKey; + this._setting.jXorKey = (byte)this.jXorKey; this._isDirty = false; - EditorUtility.SetDirty(this._settings); + EditorUtility.SetDirty(this._setting); AssetDatabase.SaveAssets(); if (isShowDialog) EditorUtility.DisplayDialog("Crytogram Message", "Saved [Head-Tail 2 XOR] Setting.", "OK"); @@ -295,11 +295,11 @@ private void _SaveData(CryptogramType cryptogramType, bool isShowDialog = false) break; } - this._settings.aesKey = this.aesKey; - this._settings.aesIv = this.aesIv; + this._setting.aesKey = this.aesKey; + this._setting.aesIv = this.aesIv; this._isDirty = false; - EditorUtility.SetDirty(this._settings); + EditorUtility.SetDirty(this._setting); AssetDatabase.SaveAssets(); if (isShowDialog) EditorUtility.DisplayDialog("Crytogram Message", "Saved [AES] Setting.", "OK"); diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/YooAssets/EncryptionServices.cs b/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/YooAssets/EncryptionServices.cs index b4b6fa27..711766f0 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/YooAssets/EncryptionServices.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Editor/Bundle/YooAssets/EncryptionServices.cs @@ -7,12 +7,12 @@ namespace OxGFrame.AssetLoader.Editor { public static class CryptogramSettingSetup { - public static CryptogramSetting cryptogramSettings; + public static CryptogramSetting cryptogramSetting; - public static CryptogramSetting GetCryptogramSettings() + public static CryptogramSetting GetCryptogramSetting() { - if (cryptogramSettings == null) cryptogramSettings = EditorTool.LoadSettingData(); - return cryptogramSettings; + if (cryptogramSetting == null) cryptogramSetting = EditorTool.LoadSettingData(); + return cryptogramSetting; } } @@ -20,7 +20,7 @@ public class OffSetEncryption : IEncryptionServices { public EncryptResult Encrypt(EncryptFileInfo fileInfo) { - var cryptogramSettings = CryptogramSettingSetup.GetCryptogramSettings(); + var cryptogramSettings = CryptogramSettingSetup.GetCryptogramSetting(); string filePath = fileInfo.FilePath; @@ -51,7 +51,7 @@ public class XorEncryption : IEncryptionServices { public EncryptResult Encrypt(EncryptFileInfo fileInfo) { - var cryptogramSettings = CryptogramSettingSetup.GetCryptogramSettings(); + var cryptogramSettings = CryptogramSettingSetup.GetCryptogramSetting(); string filePath = fileInfo.FilePath; @@ -81,7 +81,7 @@ public class HT2XorEncryption : IEncryptionServices { public EncryptResult Encrypt(EncryptFileInfo fileInfo) { - var cryptogramSettings = CryptogramSettingSetup.GetCryptogramSettings(); + var cryptogramSettings = CryptogramSettingSetup.GetCryptogramSetting(); string filePath = fileInfo.FilePath; @@ -113,7 +113,7 @@ public class AesEncryption : IEncryptionServices { public EncryptResult Encrypt(EncryptFileInfo fileInfo) { - var cryptogramSettings = CryptogramSettingSetup.GetCryptogramSettings(); + var cryptogramSettings = CryptogramSettingSetup.GetCryptogramSetting(); string filePath = fileInfo.FilePath; diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/AssetLoaders.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/AssetLoaders.cs index c7a5879e..5070d06f 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/AssetLoaders.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/AssetLoaders.cs @@ -2,6 +2,7 @@ using OxGFrame.AssetLoader.Cacher; using OxGFrame.AssetLoader.GroupCahcer; using OxGFrame.AssetLoader.GroupChacer; +using OxGKit.LoggingSystem; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; @@ -197,13 +198,13 @@ public static string GetRawFilePath(string packageName, string assetName) public static async UniTask PreloadRawFileAsync(string assetName, Progression progression = null) { var packageName = AssetPatcher.GetDefaultPackageName(); - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else await CacheBundle.GetInstance().PreloadRawFileAsync(packageName, new string[] { assetName }, progression); } public static async UniTask PreloadRawFileAsync(string packageName, string assetName, Progression progression = null) { - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else await CacheBundle.GetInstance().PreloadRawFileAsync(packageName, new string[] { assetName }, progression); } @@ -223,7 +224,7 @@ public static async UniTask PreloadRawFileAsync(string[] assetNames, Progression if (RefineResourcesPath(ref assetNames[i])) refineAssetNames.Add(assetNames[i]); } - if (refineAssetNames.Count > 0) Debug.Log("【Error】Only Bundle Type"); + if (refineAssetNames.Count > 0) Logging.Print("【Error】Only Bundle Type"); else await CacheBundle.GetInstance().PreloadRawFileAsync(packageName, assetNames, progression); } @@ -241,20 +242,20 @@ public static async UniTask PreloadRawFileAsync(string packageName, string[] ass if (RefineResourcesPath(ref assetNames[i])) refineAssetNames.Add(assetNames[i]); } - if (refineAssetNames.Count > 0) Debug.Log("【Error】Only Bundle Type"); + if (refineAssetNames.Count > 0) Logging.Print("【Error】Only Bundle Type"); else await CacheBundle.GetInstance().PreloadRawFileAsync(packageName, assetNames, progression); } public static void PreloadRawFile(string assetName, Progression progression = null) { var packageName = AssetPatcher.GetDefaultPackageName(); - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else CacheBundle.GetInstance().PreloadRawFile(packageName, new string[] { assetName }, progression); } public static void PreloadRawFile(string packageName, string assetName, Progression progression = null) { - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else CacheBundle.GetInstance().PreloadRawFile(packageName, new string[] { assetName }, progression); } @@ -274,7 +275,7 @@ public static void PreloadRawFile(string[] assetNames, Progression progression = if (RefineResourcesPath(ref assetNames[i])) refineAssetNames.Add(assetNames[i]); } - if (refineAssetNames.Count > 0) Debug.Log("【Error】Only Bundle Type"); + if (refineAssetNames.Count > 0) Logging.Print("【Error】Only Bundle Type"); else CacheBundle.GetInstance().PreloadRawFile(packageName, assetNames, progression); } @@ -292,7 +293,7 @@ public static void PreloadRawFile(string packageName, string[] assetNames, Progr if (RefineResourcesPath(ref assetNames[i])) refineAssetNames.Add(assetNames[i]); } - if (refineAssetNames.Count > 0) Debug.Log("【Error】Only Bundle Type"); + if (refineAssetNames.Count > 0) Logging.Print("【Error】Only Bundle Type"); else CacheBundle.GetInstance().PreloadRawFile(packageName, assetNames, progression); } @@ -308,7 +309,7 @@ public static async UniTask LoadRawFileAsync(string assetName, Progression var packageName = AssetPatcher.GetDefaultPackageName(); if (RefineResourcesPath(ref assetName)) { - Debug.Log("【Error】Only Bundle Type"); + Logging.Print("【Error】Only Bundle Type"); return default; } return await CacheBundle.GetInstance().LoadRawFileAsync(packageName, assetName, progression); @@ -318,7 +319,7 @@ public static async UniTask LoadRawFileAsync(string packageName, string as { if (RefineResourcesPath(ref assetName)) { - Debug.Log("【Error】Only Bundle Type"); + Logging.Print("【Error】Only Bundle Type"); return default; } return await CacheBundle.GetInstance().LoadRawFileAsync(packageName, assetName, progression); @@ -336,7 +337,7 @@ public static T LoadRawFile(string assetName, Progression progression = null) var packageName = AssetPatcher.GetDefaultPackageName(); if (RefineResourcesPath(ref assetName)) { - Debug.Log("【Error】Only Bundle Type"); + Logging.Print("【Error】Only Bundle Type"); return default; } return CacheBundle.GetInstance().LoadRawFile(packageName, assetName, progression); @@ -346,7 +347,7 @@ public static T LoadRawFile(string packageName, string assetName, Progression { if (RefineResourcesPath(ref assetName)) { - Debug.Log("【Error】Only Bundle Type"); + Logging.Print("【Error】Only Bundle Type"); return default; } return CacheBundle.GetInstance().LoadRawFile(packageName, assetName, progression); @@ -354,7 +355,7 @@ public static T LoadRawFile(string packageName, string assetName, Progression public static void UnloadRawFile(string assetName, bool forceUnload = false) { - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else CacheBundle.GetInstance().UnloadRawFile(assetName, forceUnload); } @@ -891,13 +892,13 @@ public static bool HasInCache(int groupId, string assetName) public static async UniTask PreloadRawFileAsync(int groupId, string assetName, Progression progression = null) { var packageName = AssetPatcher.GetDefaultPackageName(); - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else await GroupBundle.GetInstance().PreloadRawFileAsync(groupId, packageName, new string[] { assetName }, progression); } public static async UniTask PreloadRawFileAsync(int groupId, string packageName, string assetName, Progression progression = null) { - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else await GroupBundle.GetInstance().PreloadRawFileAsync(groupId, packageName, new string[] { assetName }, progression); } @@ -917,7 +918,7 @@ public static async UniTask PreloadRawFileAsync(int groupId, string[] assetNames if (RefineResourcesPath(ref assetNames[i])) refineAssetNames.Add(assetNames[i]); } - if (refineAssetNames.Count > 0) Debug.Log("【Error】Only Bundle Type"); + if (refineAssetNames.Count > 0) Logging.Print("【Error】Only Bundle Type"); else await GroupBundle.GetInstance().PreloadRawFileAsync(groupId, packageName, assetNames, progression); } @@ -935,20 +936,20 @@ public static async UniTask PreloadRawFileAsync(int groupId, string packageName, if (RefineResourcesPath(ref assetNames[i])) refineAssetNames.Add(assetNames[i]); } - if (refineAssetNames.Count > 0) Debug.Log("【Error】Only Bundle Type"); + if (refineAssetNames.Count > 0) Logging.Print("【Error】Only Bundle Type"); else await GroupBundle.GetInstance().PreloadRawFileAsync(groupId, packageName, assetNames, progression); } public static void PreloadRawFile(int groupId, string assetName, Progression progression = null) { var packageName = AssetPatcher.GetDefaultPackageName(); - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else GroupBundle.GetInstance().PreloadRawFile(groupId, packageName, new string[] { assetName }, progression); } public static void PreloadRawFile(int groupId, string packageName, string assetName, Progression progression = null) { - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else GroupBundle.GetInstance().PreloadRawFile(groupId, packageName, new string[] { assetName }, progression); } @@ -968,7 +969,7 @@ public static void PreloadRawFile(int groupId, string[] assetNames, Progression if (RefineResourcesPath(ref assetNames[i])) refineAssetNames.Add(assetNames[i]); } - if (refineAssetNames.Count > 0) Debug.Log("【Error】Only Bundle Type"); + if (refineAssetNames.Count > 0) Logging.Print("【Error】Only Bundle Type"); else GroupBundle.GetInstance().PreloadRawFile(groupId, packageName, assetNames, progression); } @@ -986,7 +987,7 @@ public static void PreloadRawFile(int groupId, string packageName, string[] asse if (RefineResourcesPath(ref assetNames[i])) refineAssetNames.Add(assetNames[i]); } - if (refineAssetNames.Count > 0) Debug.Log("【Error】Only Bundle Type"); + if (refineAssetNames.Count > 0) Logging.Print("【Error】Only Bundle Type"); else GroupBundle.GetInstance().PreloadRawFile(groupId, packageName, assetNames, progression); } @@ -1003,7 +1004,7 @@ public static async UniTask LoadRawFileAsync(int groupId, string assetName var packageName = AssetPatcher.GetDefaultPackageName(); if (RefineResourcesPath(ref assetName)) { - Debug.Log("【Error】Only Bundle Type"); + Logging.Print("【Error】Only Bundle Type"); return default; } else return await GroupBundle.GetInstance().LoadRawFileAsync(groupId, packageName, assetName, progression); @@ -1013,7 +1014,7 @@ public static async UniTask LoadRawFileAsync(int groupId, string packageNa { if (RefineResourcesPath(ref assetName)) { - Debug.Log("【Error】Only Bundle Type"); + Logging.Print("【Error】Only Bundle Type"); return default; } else return await GroupBundle.GetInstance().LoadRawFileAsync(groupId, packageName, assetName, progression); @@ -1032,7 +1033,7 @@ public static T LoadRawFile(int groupId, string assetName, Progression progre var packageName = AssetPatcher.GetDefaultPackageName(); if (RefineResourcesPath(ref assetName)) { - Debug.Log("【Error】Only Bundle Type"); + Logging.Print("【Error】Only Bundle Type"); return default; } else return GroupBundle.GetInstance().LoadRawFile(groupId, packageName, assetName, progression); @@ -1042,7 +1043,7 @@ public static T LoadRawFile(int groupId, string packageName, string assetName { if (RefineResourcesPath(ref assetName)) { - Debug.Log("【Error】Only Bundle Type"); + Logging.Print("【Error】Only Bundle Type"); return default; } else return GroupBundle.GetInstance().LoadRawFile(groupId, packageName, assetName, progression); @@ -1050,7 +1051,7 @@ public static T LoadRawFile(int groupId, string packageName, string assetName public static void UnloadRawFile(int groupId, string assetName, bool forceUnload = false) { - if (RefineResourcesPath(ref assetName)) Debug.Log("【Error】Only Bundle Type"); + if (RefineResourcesPath(ref assetName)) Logging.Print("【Error】Only Bundle Type"); else GroupBundle.GetInstance().UnloadRawFile(groupId, assetName, forceUnload); } diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/FileCryptogram.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/FileCryptogram.cs index d9bf126d..28191c41 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/FileCryptogram.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/FileCryptogram.cs @@ -1,4 +1,5 @@ -using System; +using OxGKit.LoggingSystem; +using System; using System.IO; using System.Security.Cryptography; using System.Text; @@ -450,7 +451,7 @@ public static bool AesEncryptFile(string sourceFile, string key = null, string i } catch (Exception ex) { - Debug.Log($"File Encrypt failed. {ex}"); + Logging.Print($"File Encrypt failed. {ex}"); return false; } @@ -496,7 +497,7 @@ public static bool AesDecryptFile(string encryptFile, string key = null, string } catch (Exception ex) { - Debug.Log($"File Decrypt failed. {ex}"); + Logging.Print($"File Decrypt failed. {ex}"); return false; } @@ -535,7 +536,7 @@ public static bool AesEncryptBytes(ref byte[] rawBytes, string key = null, strin } catch (Exception ex) { - Debug.Log($"File Encrypt failed. {ex}"); + Logging.Print($"File Encrypt failed. {ex}"); return false; } @@ -578,7 +579,7 @@ public static bool AesDecryptBytes(byte[] encryptBytes, string key = null, strin } catch (Exception ex) { - Debug.Log($"File Decrypt failed. {ex}"); + Logging.Print($"File Decrypt failed. {ex}"); return false; } @@ -620,7 +621,7 @@ public static Stream AesDecryptStream(string encryptFile, string key = null, str } catch (Exception ex) { - Debug.Log($"File Decrypt failed. {ex}"); + Logging.Print($"File Decrypt failed. {ex}"); return null; } diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PackageManager.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PackageManager.cs index a90e1b90..d7ea4161 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PackageManager.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PackageManager.cs @@ -1,4 +1,5 @@ using Cysharp.Threading.Tasks; +using OxGKit.LoggingSystem; using System; using System.Collections.Generic; using System.IO; @@ -47,7 +48,7 @@ public async static UniTask InitSetup() _decryption = new AesDecryption(); break; } - Debug.Log($"Init Bundle Decryption: {cryptogramType}"); + Logging.Print($"Init Bundle Decryption: {cryptogramType}"); #endregion #region Init Preset App Packages @@ -112,7 +113,7 @@ public static async UniTask InitPackage(string packageName, bool autoUpdat if (package.InitializeStatus == EOperationStatus.Succeed) { if (autoUpdate) await UpdatePackage(packageName); - Debug.Log($"Package: {packageName} is initialized. Status: {package.InitializeStatus}."); + Logging.Print($"Package: {packageName} is initialized. Status: {package.InitializeStatus}."); return true; } @@ -159,12 +160,12 @@ public static async UniTask InitPackage(string packageName, bool autoUpdat if (initializationOperation.Status == EOperationStatus.Succeed) { if (autoUpdate) await UpdatePackage(packageName); - Debug.Log($"Package: {packageName} Init completed successfully."); + Logging.Print($"Package: {packageName} Init completed successfully."); return true; } else { - Debug.Log($"Package: {packageName} init failed."); + Logging.Print($"Package: {packageName} init failed."); return false; } } @@ -187,18 +188,18 @@ public static async UniTask UpdatePackage(string packageName) await manifestOperation; if (manifestOperation.Status == EOperationStatus.Succeed) { - Debug.Log($"Package: {packageName} Update completed successfully."); + Logging.Print($"Package: {packageName} Update completed successfully."); return true; } else { - Debug.Log($"Package: {packageName} update manifest failed."); + Logging.Print($"Package: {packageName} update manifest failed."); return false; } } else { - Debug.Log($"Package: {packageName} update version failed."); + Logging.Print($"Package: {packageName} update version failed."); return false; } } @@ -212,7 +213,7 @@ public static bool CheckPackageHasAnyFilesInLocal(string packageName) { if (BundleConfig.playMode == BundleConfig.PlayMode.EditorSimulateMode) { - Debug.Log($"[{BundleConfig.PlayMode.EditorSimulateMode}] Check Package In Local return true"); + Logging.Print($"[{BundleConfig.PlayMode.EditorSimulateMode}] Check Package In Local return true"); return true; } @@ -242,7 +243,7 @@ public static ulong GetPackageSizeInLocal(string packageName) { if (BundleConfig.playMode == BundleConfig.PlayMode.EditorSimulateMode) { - Debug.Log($"[{BundleConfig.PlayMode.EditorSimulateMode}] Get Package Size In Local return 1"); + Logging.Print($"[{BundleConfig.PlayMode.EditorSimulateMode}] Get Package Size In Local return 1"); return 1; } @@ -469,7 +470,7 @@ public static string GetPresetAppPackageNameByIdx(int idx) if (idx >= BundleConfig.listPackages.Count) { idx = BundleConfig.listPackages.Count - 1; - Debug.Log($"Package Idx Warning: {idx} is out of range will be auto set last idx."); + Logging.Print($"Package Idx Warning: {idx} is out of range will be auto set last idx."); } else if (idx < 0) idx = 0; diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchFsm/PatchFsmStates.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchFsm/PatchFsmStates.cs index dc7ee323..c941fe6f 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchFsm/PatchFsmStates.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchFsm/PatchFsmStates.cs @@ -3,6 +3,7 @@ using OxGFrame.AssetLoader.Bundle; using OxGFrame.AssetLoader.PatchEvent; using OxGFrame.AssetLoader.Utility; +using OxGKit.LoggingSystem; using OxGKit.Utilities.Request; using System; using System.Collections.Generic; @@ -178,7 +179,7 @@ private async UniTask _AppVersionComparison(AppConfig hostCfg) } else { - Debug.Log("Cannot found bundle config from StreamingAssets."); + Logging.Print("Cannot found bundle config from StreamingAssets."); return; } } @@ -241,7 +242,7 @@ private async UniTask _AppVersionComparison(AppConfig hostCfg) } catch { - Debug.Log("Read Local Config failed."); + Logging.Print("Read Local Config failed."); } if (BundleConfig.semanticRule.patch) @@ -256,8 +257,8 @@ private async UniTask _AppVersionComparison(AppConfig hostCfg) // remove last group name PatchManager.DelLastGroupInfo(); - Debug.Log("Application version inconsistent, require to update application (go to store)"); - Debug.Log($"【App Version Unpassed (X.Y.Z)】LOCAL APP_VER: v{localCfg.APP_VERSION} != SERVER APP_VER: v{hostCfg.APP_VERSION}"); + Logging.Print("Application version inconsistent, require to update application (go to store)"); + Logging.Print($"【App Version Unpassed (X.Y.Z)】LOCAL APP_VER: v{localCfg.APP_VERSION} != SERVER APP_VER: v{hostCfg.APP_VERSION}"); return; } else @@ -265,7 +266,7 @@ private async UniTask _AppVersionComparison(AppConfig hostCfg) PatchManager.appVersion = hostCfg.APP_VERSION; this._machine.ChangeState(); - Debug.Log($"【App Version Passed (X.Y.Z)】LOCAL APP_VER: v{localCfg.APP_VERSION} == SERVER APP_VER: v{hostCfg.APP_VERSION}"); + Logging.Print($"【App Version Passed (X.Y.Z)】LOCAL APP_VER: v{localCfg.APP_VERSION} == SERVER APP_VER: v{hostCfg.APP_VERSION}"); } } else @@ -287,8 +288,8 @@ private async UniTask _AppVersionComparison(AppConfig hostCfg) // remove last group name PatchManager.DelLastGroupInfo(); - Debug.Log("Application version inconsistent, require to update application (go to store)"); - Debug.Log($"【App Version Unpassed (X.Y)】LOCAL APP_VER: v{localVersion} ({localCfg.APP_VERSION}) != SERVER APP_VER: v{hostVersion} ({hostCfg.APP_VERSION})"); + Logging.Print("Application version inconsistent, require to update application (go to store)"); + Logging.Print($"【App Version Unpassed (X.Y)】LOCAL APP_VER: v{localVersion} ({localCfg.APP_VERSION}) != SERVER APP_VER: v{hostVersion} ({hostCfg.APP_VERSION})"); return; } else @@ -304,7 +305,7 @@ private async UniTask _AppVersionComparison(AppConfig hostCfg) PatchManager.appVersion = hostCfg.APP_VERSION; this._machine.ChangeState(); - Debug.Log($"【App Version Passed (X.Y)】LOCAL APP_VER: v{localVersion} ({localCfg.APP_VERSION}) == SERVER APP_VER: v{hostVersion} ({hostCfg.APP_VERSION})"); + Logging.Print($"【App Version Passed (X.Y)】LOCAL APP_VER: v{localVersion} ({localCfg.APP_VERSION}) == SERVER APP_VER: v{hostVersion} ({hostCfg.APP_VERSION})"); } } } @@ -356,13 +357,13 @@ private async UniTask _InitPatchMode() } this._machine.ChangeState(); - Debug.Log("(Repair) Repair Patch"); + Logging.Print("(Repair) Repair Patch"); return; } else if (PackageManager.isInitialized) { this._machine.ChangeState(); - Debug.Log("(Check) Check Patch"); + Logging.Print("(Check) Check Patch"); return; } @@ -370,7 +371,7 @@ private async UniTask _InitPatchMode() if (isInitialized) { this._machine.ChangeState(); - Debug.Log("(Init) Init Patch"); + Logging.Print("(Init) Init Patch"); } else { @@ -430,7 +431,7 @@ private async UniTask _UpdatePatchVersion() { succeed = false; PatchEvents.PatchVersionUpdateFailed.SendEventMessage(); - Debug.Log($"Package: {package.PackageName} update version failed."); + Logging.Print($"Package: {package.PackageName} update version failed."); break; } } @@ -488,13 +489,13 @@ private async UniTask _UpdatePatchManifest() { succeed = true; operation.SavePackageVersion(); - Debug.Log($"Package: {packages[i].PackageName} Update completed successfully."); + Logging.Print($"Package: {packages[i].PackageName} Update completed successfully."); } else { succeed = false; PatchEvents.PatchManifestUpdateFailed.SendEventMessage(); - Debug.Log($"Package: {packages[i].PackageName} update manifest failed."); + Logging.Print($"Package: {packages[i].PackageName} update manifest failed."); break; } } @@ -551,7 +552,7 @@ private async UniTask _CreateDownloader() string defaultGroupTag = PatchManager.DEFAULT_GROUP_TAG; GroupInfo lastGroupInfo = PatchManager.GetLastGroupInfo(); - Debug.Log($"Get last GroupName: {lastGroupInfo?.groupName}"); + Logging.Print($"Get last GroupName: {lastGroupInfo?.groupName}"); #region Create Downaloder by Tags string url = await BundleConfig.GetHostServerPatchConfigPath(); @@ -708,9 +709,9 @@ private async UniTask _CreateDownloader() if (newGroupInfos.Count > 0) { - Debug.Log($"Auto check last GroupName: {lastGroupInfo?.groupName}"); + Logging.Print($"Auto check last GroupName: {lastGroupInfo?.groupName}"); - Debug.Log($"Found total group {newGroupInfos.Count} to choose download =>\n{JsonConvert.SerializeObject(newGroupInfos)}"); + Logging.Print($"Found total group {newGroupInfos.Count} to choose download =>\n{JsonConvert.SerializeObject(newGroupInfos)}"); PatchEvents.PatchCreateDownloader.SendEventMessage(newGroupInfos.Values.ToArray()); @@ -718,7 +719,7 @@ private async UniTask _CreateDownloader() } else { - Debug.Log($"GroupName: {lastGroupInfo?.groupName} not found any download files!!!"); + Logging.Print($"GroupName: {lastGroupInfo?.groupName} not found any download files!!!"); this._machine.ChangeState(); } @@ -761,7 +762,7 @@ private async UniTask _StartDownload() // Get last GroupInfo by UserEvent Set GroupInfo lastGroupInfo = PatchManager.GetLastGroupInfo(); - Debug.Log($"Start Download Group Name: {lastGroupInfo?.groupName}, Tags: {JsonConvert.SerializeObject(lastGroupInfo?.tags)}"); + Logging.Print($"Start Download Group Name: {lastGroupInfo?.groupName}, Tags: {JsonConvert.SerializeObject(lastGroupInfo?.tags)}"); List mainDownloaders = new List(); foreach (var package in packages) diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchLauncher.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchLauncher.cs index 418f6b6a..cb7c73e6 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchLauncher.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchLauncher.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using UnityEngine; using YooAsset; +using OxGKit.LoggingSystem; #if UNITY_EDITOR using UnityEditor; @@ -88,8 +89,8 @@ private async void Awake() if (PackageManager.isInitialized) { - Debug.Log($"(Powered by YooAsset) Initialized Play Mode: {BundleConfig.playMode}"); - Debug.Log("(Powered by YooAsset) PatchLauncher Setup Completes."); + Logging.Print($"(Powered by YooAsset) Initialized Play Mode: {BundleConfig.playMode}"); + Logging.Print("(Powered by YooAsset) PatchLauncher Setup Completes."); } } @@ -97,7 +98,7 @@ private void OnApplicationQuit() { #if !UNITY_WEBGL PackageManager.Release(); - Debug.Log("(Powered by YooAsset) Release Packages Completes."); + Logging.Print("(Powered by YooAsset) Release Packages Completes."); #endif } @@ -109,10 +110,10 @@ private void OnValidate() { case BundleConfig.PlayMode.OfflineMode: - Debug.Log($"[Offline Mode] is not supported on {EditorUserBuildSettings.activeBuildTarget}."); + Logging.Print($"[Offline Mode] is not supported on {EditorUserBuildSettings.activeBuildTarget}."); break; case BundleConfig.PlayMode.HostMode: - Debug.Log($"[Host Mode] is not supported on {EditorUserBuildSettings.activeBuildTarget}."); + Logging.Print($"[Host Mode] is not supported on {EditorUserBuildSettings.activeBuildTarget}."); break; } #else @@ -120,7 +121,7 @@ private void OnValidate() { case BundleConfig.PlayMode.WebGLMode: - Debug.Log($"[WebGL Mode] is not supported on {EditorUserBuildSettings.activeBuildTarget}."); + Logging.Print($"[WebGL Mode] is not supported on {EditorUserBuildSettings.activeBuildTarget}."); break; } #endif diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchManager.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchManager.cs index e8b3dc46..681e9a2d 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchManager.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/PatchManager.cs @@ -5,6 +5,7 @@ using OxGFrame.AssetLoader.PatchFsm; using YooAsset; using Newtonsoft.Json; +using OxGKit.LoggingSystem; namespace OxGFrame.AssetLoader.Bundle { @@ -64,37 +65,37 @@ public PatchManager() switch (msgData.stateNode) { case PatchFsmStates.FsmPatchRepair: - Debug.Log(" >>>> PatchFsmStates.FsmPatchRepair <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmPatchRepair <<<< "); break; case PatchFsmStates.FsmPatchPrepare: - Debug.Log(" >>>> PatchFsmStates.FsmPatchPrepare <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmPatchPrepare <<<< "); break; case PatchFsmStates.FsmAppVersionUpdate: - Debug.Log(" >>>> PatchFsmStates.FsmAppVersionUpdate <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmAppVersionUpdate <<<< "); break; case PatchFsmStates.FsmInitPatchMode: - Debug.Log(" >>>> PatchFsmStates.FsmInitPatchMode <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmInitPatchMode <<<< "); break; case PatchFsmStates.FsmPatchVersionUpdate: - Debug.Log(" >>>> PatchFsmStates.FsmPatchVersionUpdate <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmPatchVersionUpdate <<<< "); break; case PatchFsmStates.FsmPatchManifestUpdate: - Debug.Log(" >>>> PatchFsmStates.FsmPatchManifestUpdate <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmPatchManifestUpdate <<<< "); break; case PatchFsmStates.FsmCreateDownloader: - Debug.Log(" >>>> PatchFsmStates.FsmCreateDownloader <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmCreateDownloader <<<< "); break; case PatchFsmStates.FsmBeginDownload: - Debug.Log(" >>>> PatchFsmStates.FsmBeginDownloadFiles <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmBeginDownloadFiles <<<< "); break; case PatchFsmStates.FsmDownloadOver: - Debug.Log(" >>>> PatchFsmStates.FsmDownloadOver <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmDownloadOver <<<< "); break; case PatchFsmStates.FsmClearCache: - Debug.Log(" >>>> PatchFsmStates.FsmClearCache <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmClearCache <<<< "); break; case PatchFsmStates.FsmPatchDone: - Debug.Log(" >>>> PatchFsmStates.FsmPatchDone <<<< "); + Logging.Print(" >>>> PatchFsmStates.FsmPatchDone <<<< "); break; } }); diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/YooAssets/QueryServices.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/YooAssets/QueryServices.cs index 91691728..818b9784 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/YooAssets/QueryServices.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/YooAssets/QueryServices.cs @@ -1,4 +1,5 @@ -using System.Collections; +using OxGKit.LoggingSystem; +using System.Collections; using System.IO; using UnityEngine; using UnityEngine.Networking; @@ -33,7 +34,7 @@ protected IEnumerator WebRequest(string url) { if (request == null) { - Debug.Log($"Request is null. URL: {url}"); + Logging.Print($"Request is null. URL: {url}"); yield return false; } @@ -42,14 +43,14 @@ protected IEnumerator WebRequest(string url) request.result == UnityWebRequest.Result.ProtocolError || request.result == UnityWebRequest.Result.ConnectionError) { - Debug.Log($"【Query】Request failed. Code: {request.responseCode}, URL: {url}"); + Logging.Print($"【Query】Request failed. Code: {request.responseCode}, URL: {url}"); request?.Dispose(); yield return false; } if (request.downloadedBytes > 0 && request.responseCode < 400) { - Debug.Log($"【Query】Request succeeded. Code: {request.responseCode}, PartialBytes: {request.downloadedBytes}, URL: {url}"); + Logging.Print($"【Query】Request succeeded. Code: {request.responseCode}, PartialBytes: {request.downloadedBytes}, URL: {url}"); request?.Dispose(); yield return true; } diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/YooAssets/StreamingAssetsHelper/StreamingAssetsHelper.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/YooAssets/StreamingAssetsHelper/StreamingAssetsHelper.cs index fc52ca90..f5fbea2c 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/YooAssets/StreamingAssetsHelper/StreamingAssetsHelper.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Bundle/YooAssets/StreamingAssetsHelper/StreamingAssetsHelper.cs @@ -1,6 +1,7 @@ using System.IO; using System.Collections.Generic; using UnityEngine; +using OxGKit.LoggingSystem; namespace OxGFrame.AssetLoader.Bundle { @@ -18,11 +19,11 @@ public static bool FileExists(string packageName, string fileName) string filePath = Path.Combine(Application.streamingAssetsPath, BundleConfig.yooDefaultFolderName, packageName, fileName); if (File.Exists(filePath)) { - Debug.Log($"【Query】Request succeeded. File: {filePath}"); + Logging.Print($"【Query】Request succeeded. File: {filePath}"); return true; } - Debug.Log($"【Query】Request failed. File: {filePath}"); + Logging.Print($"【Query】Request failed. File: {filePath}"); return false; } } @@ -63,11 +64,11 @@ public static bool FileExists(string packageName, string fileName) if (_cacheData.Contains(fileName)) { - Debug.Log($"【Query】Request succeeded. File: {fileName}"); + Logging.Print($"【Query】Request succeeded. File: {fileName}"); return true; } - Debug.Log($"【Query】Request failed. File: {fileName}"); + Logging.Print($"【Query】Request failed. File: {fileName}"); return false; } } @@ -91,7 +92,7 @@ public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report) DirectoryInfo root = new DirectoryInfo(folderPath); if (root.Exists == false) { - Debug.Log($"No Built-in Bundles Found: {folderPath}"); + Logging.Print($"No Built-in Bundles Found: {folderPath}"); return; } @@ -111,7 +112,7 @@ public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report) UnityEditor.AssetDatabase.CreateAsset(manifest, saveFilePath); UnityEditor.AssetDatabase.SaveAssets(); UnityEditor.AssetDatabase.Refresh(); - Debug.Log($"Total File Count: {manifest.BuildinFiles.Count} in Built-in. The BuildinFileManifest Save Succeeded: {saveFilePath}"); + Logging.Print($"Total File Count: {manifest.BuildinFiles.Count} in Built-in. The BuildinFileManifest Save Succeeded: {saveFilePath}"); } } #endif diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Cacher/CacheBundle.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Cacher/CacheBundle.cs index e5a042bd..dd08efa3 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Cacher/CacheBundle.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Cacher/CacheBundle.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using OxGFrame.AssetLoader.Bundle; +using OxGKit.LoggingSystem; using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -59,7 +60,7 @@ public async UniTask PreloadRawFileAsync(string packageName, string[] assetNames // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return; } @@ -91,7 +92,7 @@ public async UniTask PreloadRawFileAsync(string packageName, string[] assetNames BundlePack pack = new BundlePack(); var package = PackageManager.GetPackage(packageName); - if (package == null) Debug.Log($"Package: {packageName} is not exist."); + if (package == null) Logging.Print($"Package: {packageName} is not exist."); var req = package?.LoadRawFileAsync(assetName); if (req != null) @@ -122,7 +123,7 @@ public async UniTask PreloadRawFileAsync(string packageName, string[] assetNames if (!this.HasInCache(assetName)) { this._cacher.Add(assetName, pack); - Debug.Log($"【Preload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"【Preload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); } } } @@ -149,7 +150,7 @@ public void PreloadRawFile(string packageName, string[] assetNames, Progression // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return; } @@ -181,7 +182,7 @@ public void PreloadRawFile(string packageName, string[] assetNames, Progression BundlePack pack = new BundlePack(); var package = PackageManager.GetPackage(packageName); - if (package == null) Debug.Log($"Package: {packageName} is not exist."); + if (package == null) Logging.Print($"Package: {packageName} is not exist."); var req = package?.LoadRawFileSync(assetName); if (req != null) @@ -205,7 +206,7 @@ public void PreloadRawFile(string packageName, string[] assetNames, Progression if (!this.HasInCache(assetName)) { this._cacher.Add(assetName, pack); - Debug.Log($"【Preload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"【Preload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); } } } @@ -222,7 +223,7 @@ public async UniTask LoadRawFileAsync(string packageName, string assetName // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return default; } @@ -242,7 +243,7 @@ public async UniTask LoadRawFileAsync(string packageName, string assetName pack = new BundlePack(); { var package = PackageManager.GetPackage(packageName); - if (package == null) Debug.Log($"Package: {packageName} is not exist."); + if (package == null) Logging.Print($"Package: {packageName} is not exist."); var req = package?.LoadRawFileAsync(assetName); if (req != null) @@ -295,7 +296,7 @@ public async UniTask LoadRawFileAsync(string packageName, string assetName { // 引用計數++ pack.AddRef(); - Debug.Log($"【Load】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); + Logging.Print($"【Load】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); } else { @@ -316,7 +317,7 @@ public T LoadRawFile(string packageName, string assetName, Progression progre // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return default; } @@ -336,7 +337,7 @@ public T LoadRawFile(string packageName, string assetName, Progression progre pack = new BundlePack(); { var package = PackageManager.GetPackage(packageName); - if (package == null) Debug.Log($"Package: {packageName} is not exist."); + if (package == null) Logging.Print($"Package: {packageName} is not exist."); var req = package?.LoadRawFileSync(assetName); if (req != null) @@ -382,7 +383,7 @@ public T LoadRawFile(string packageName, string assetName, Progression progre { // 引用計數++ pack.AddRef(); - Debug.Log($"【Load】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); + Logging.Print($"【Load】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); } else { @@ -402,7 +403,7 @@ public void UnloadRawFile(string assetName, bool forceUnload = false) if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return; } @@ -416,7 +417,7 @@ public void UnloadRawFile(string assetName, bool forceUnload = false) // 引用計數-- pack.DelRef(); - Debug.Log($"Unload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); + Logging.Print($"Unload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); if (forceUnload) { @@ -427,7 +428,7 @@ public void UnloadRawFile(string assetName, bool forceUnload = false) var package = PackageManager.GetPackage(packageName); package?.UnloadUnusedAssets(); - Debug.Log($"Force Unload Completes】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"Force Unload Completes】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); } else if (this._cacher[assetName].refCount <= 0) { @@ -438,10 +439,10 @@ public void UnloadRawFile(string assetName, bool forceUnload = false) var package = PackageManager.GetPackage(packageName); package?.UnloadUnusedAssets(); - Debug.Log($"Unload Completes】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"Unload Completes】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); } } - else Debug.Log($"Unload Type Error】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); + else Logging.Print($"Unload Type Error】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); } } @@ -468,7 +469,7 @@ public void ReleaseRawFiles() package?.UnloadUnusedAssets(); } - Debug.Log($"【Release All RawFiles】 => Current << CacheBundle >> Cache Count: {this.Count}"); + Logging.Print($"【Release All RawFiles】 => Current << CacheBundle >> Cache Count: {this.Count}"); } #endregion @@ -480,7 +481,7 @@ public async UniTask LoadSceneAsync(string packageName, string asset // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return null; } @@ -492,7 +493,7 @@ public async UniTask LoadSceneAsync(string packageName, string asset this._loadingFlags.Add(assetName); var package = PackageManager.GetPackage(packageName); - if (package == null) Debug.Log($"Package: {packageName} is not exist."); + if (package == null) Logging.Print($"Package: {packageName} is not exist."); var req = package?.LoadSceneAsync(assetName, loadSceneMode, !activateOnLoad, priority); var pack = new BundlePack(); @@ -534,14 +535,14 @@ public async UniTask LoadSceneAsync(string packageName, string asset var count = this._sceneCounter[assetName]; string key = $"{assetName}#{count}"; this._sceneCache.Add(key, pack); - Debug.Log($"【Load Scene Additive】 => << CacheBundle >> scene: {key}"); + Logging.Print($"【Load Scene Additive】 => << CacheBundle >> scene: {key}"); } else { var count = ++this._sceneCounter[assetName]; string key = $"{assetName}#{count}"; this._sceneCache.Add(key, pack); - Debug.Log($"【Load Scene Additive】 => << CacheBundle >> scene: {key}"); + Logging.Print($"【Load Scene Additive】 => << CacheBundle >> scene: {key}"); } } break; @@ -577,7 +578,7 @@ public void UnloadScene(string assetName, bool recursively = false) this._sceneCache[key] = null; this._sceneCache.Remove(key); - Debug.Log($"【Unload Additive Scene】 => << CacheBundle >> scene: {key}, count: {topCount}"); + Logging.Print($"【Unload Additive Scene】 => << CacheBundle >> scene: {key}, count: {topCount}"); } } } @@ -585,7 +586,7 @@ public void UnloadScene(string assetName, bool recursively = false) // 遞迴完, 移除計數緩存 this._sceneCounter.Remove(assetName); - Debug.Log($"Unload Additive Scene Completes】 => << CacheBundle >> sceneName: {assetName}, recursively: {recursively}"); + Logging.Print($"Unload Additive Scene Completes】 => << CacheBundle >> sceneName: {assetName}, recursively: {recursively}"); } else { @@ -623,7 +624,7 @@ public void UnloadScene(string assetName, bool recursively = false) this._sceneCache[key] = null; this._sceneCache.Remove(key); - Debug.Log($"Safty Unload Additive Scene】 => << CacheBundle >> scene: {key}, count: {topCount}"); + Logging.Print($"Safty Unload Additive Scene】 => << CacheBundle >> scene: {key}, count: {topCount}"); } } } @@ -632,7 +633,7 @@ public void UnloadScene(string assetName, bool recursively = false) this._sceneCounter.Remove(assetName); package?.UnloadUnusedAssets(); - Debug.Log($"Safty Unload Additive Scene Completes】 => << CacheBundle >> sceneName: {assetName}, recursively: {recursively}"); + Logging.Print($"Safty Unload Additive Scene Completes】 => << CacheBundle >> sceneName: {assetName}, recursively: {recursively}"); } else { @@ -647,7 +648,7 @@ public void UnloadScene(string assetName, bool recursively = false) this._sceneCache[key] = null; this._sceneCache.Remove(key); - Debug.Log($"【Unload Additive Scene】 => << CacheBundle >> scene: {key}, count: {topCount}"); + Logging.Print($"【Unload Additive Scene】 => << CacheBundle >> scene: {key}, count: {topCount}"); topCount = --this._sceneCounter[assetName]; @@ -657,13 +658,13 @@ public void UnloadScene(string assetName, bool recursively = false) var package = PackageManager.GetPackage(packageName); this._sceneCounter.Remove(assetName); package?.UnloadUnusedAssets(); - Debug.Log($"Unload Additive Scene Completes】 => << CacheBundle >> sceneName: {assetName}, recursively: {recursively}"); + Logging.Print($"Unload Additive Scene Completes】 => << CacheBundle >> sceneName: {assetName}, recursively: {recursively}"); } } } } } - else Debug.Log($"Unload Scene Invalid】 => << CacheBundle >> sceneName: {assetName} maybe not Additive or is Single"); + else Logging.Print($"Unload Scene Invalid】 => << CacheBundle >> sceneName: {assetName} maybe not Additive or is Single"); } #endregion @@ -685,7 +686,7 @@ public async UniTask PreloadAssetAsync(string packageName, string[] assetName // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return; } @@ -717,7 +718,7 @@ public async UniTask PreloadAssetAsync(string packageName, string[] assetName BundlePack pack = new BundlePack(); var package = PackageManager.GetPackage(packageName); - if (package == null) Debug.Log($"Package: {packageName} is not exist."); + if (package == null) Logging.Print($"Package: {packageName} is not exist."); var req = package?.LoadAssetAsync(assetName); if (req != null) @@ -748,7 +749,7 @@ public async UniTask PreloadAssetAsync(string packageName, string[] assetName if (!this.HasInCache(assetName)) { this._cacher.Add(assetName, pack); - Debug.Log($"【Preload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"【Preload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); } } } @@ -775,7 +776,7 @@ public void PreloadAsset(string packageName, string[] assetNames, Progression // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return; } @@ -807,7 +808,7 @@ public void PreloadAsset(string packageName, string[] assetNames, Progression BundlePack pack = new BundlePack(); var package = PackageManager.GetPackage(packageName); - if (package == null) Debug.Log($"Package: {packageName} is not exist."); + if (package == null) Logging.Print($"Package: {packageName} is not exist."); var req = package?.LoadAssetSync(assetName); if (req != null) @@ -831,7 +832,7 @@ public void PreloadAsset(string packageName, string[] assetNames, Progression if (!this.HasInCache(assetName)) { this._cacher.Add(assetName, pack); - Debug.Log($"【Preload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"【Preload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); } } } @@ -848,7 +849,7 @@ public async UniTask LoadAssetAsync(string packageName, string assetName, // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return null; } @@ -868,7 +869,7 @@ public async UniTask LoadAssetAsync(string packageName, string assetName, pack = new BundlePack(); { var package = PackageManager.GetPackage(packageName); - if (package == null) Debug.Log($"Package: {packageName} is not exist."); + if (package == null) Logging.Print($"Package: {packageName} is not exist."); var req = package?.LoadAssetAsync(assetName); if (req != null) @@ -911,7 +912,7 @@ public async UniTask LoadAssetAsync(string packageName, string assetName, { // 引用計數++ pack.AddRef(); - Debug.Log($"【Load】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); + Logging.Print($"【Load】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); } else { @@ -932,7 +933,7 @@ public T LoadAsset(string packageName, string assetName, Progression progress // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return null; } @@ -952,7 +953,7 @@ public T LoadAsset(string packageName, string assetName, Progression progress pack = new BundlePack(); { var package = PackageManager.GetPackage(packageName); - if (package == null) Debug.Log($"Package: {packageName} is not exist."); + if (package == null) Logging.Print($"Package: {packageName} is not exist."); var req = package?.LoadAssetSync(assetName); if (req != null) @@ -988,7 +989,7 @@ public T LoadAsset(string packageName, string assetName, Progression progress { // 引用計數++ pack.AddRef(); - Debug.Log($"【Load】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); + Logging.Print($"【Load】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); } else { @@ -1008,7 +1009,7 @@ public void UnloadAsset(string assetName, bool forceUnload = false) if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return; } @@ -1022,7 +1023,7 @@ public void UnloadAsset(string assetName, bool forceUnload = false) // 引用計數-- pack.DelRef(); - Debug.Log($"Unload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); + Logging.Print($"Unload】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); if (forceUnload) { @@ -1033,7 +1034,7 @@ public void UnloadAsset(string assetName, bool forceUnload = false) var package = PackageManager.GetPackage(packageName); package?.UnloadUnusedAssets(); - Debug.Log($"Force Unload Completes】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"Force Unload Completes】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); } else if (this._cacher[assetName].refCount <= 0) { @@ -1044,10 +1045,10 @@ public void UnloadAsset(string assetName, bool forceUnload = false) var package = PackageManager.GetPackage(packageName); package?.UnloadUnusedAssets(); - Debug.Log($"Unload Completes】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"Unload Completes】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}"); } } - else Debug.Log($"Unload Type Error】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); + else Logging.Print($"Unload Type Error】 => Current << CacheBundle >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); } } @@ -1074,7 +1075,7 @@ public void ReleaseAssets() package?.UnloadUnusedAssets(); } - Debug.Log($"【Release All Assets】 => Current << CacheBundle >> Cache Count: {this.Count}"); + Logging.Print($"【Release All Assets】 => Current << CacheBundle >> Cache Count: {this.Count}"); } #endregion diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Cacher/CacheResource.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Cacher/CacheResource.cs index c6f81f76..057ad1e2 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Cacher/CacheResource.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Cacher/CacheResource.cs @@ -1,4 +1,5 @@ using Cysharp.Threading.Tasks; +using OxGKit.LoggingSystem; using System.Linq; using UnityEngine; @@ -51,7 +52,7 @@ public async UniTask PreloadAssetAsync(string[] assetNames, Progression progr // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return; } @@ -101,7 +102,7 @@ public async UniTask PreloadAssetAsync(string[] assetNames, Progression progr if (!this.HasInCache(assetName)) { this._cacher.Add(assetName, pack); - Debug.Log($"【Preload】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"【Preload】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}"); } } @@ -132,7 +133,7 @@ public void PreloadAsset(string[] assetNames, Progression progression = null) // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return; } @@ -168,7 +169,7 @@ public void PreloadAsset(string[] assetNames, Progression progression = null) if (!this.HasInCache(assetName)) { this._cacher.Add(assetName, pack); - Debug.Log($"【Preload】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"【Preload】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}"); } } @@ -184,7 +185,7 @@ public async UniTask LoadAssetAsync(string assetName, Progression progress // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return null; } @@ -245,7 +246,7 @@ public async UniTask LoadAssetAsync(string assetName, Progression progress { // 引用計數++ pack.AddRef(); - Debug.Log($"【Load】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); + Logging.Print($"【Load】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); } this._loadingFlags.Remove(assetName); @@ -260,7 +261,7 @@ public T LoadAsset(string assetName, Progression progression = null) where T // 如果有進行 Loading 標記後, 直接 return if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return null; } @@ -308,7 +309,7 @@ public T LoadAsset(string assetName, Progression progression = null) where T { // 引用計數++ pack.AddRef(); - Debug.Log($"【Load】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); + Logging.Print($"【Load】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}, ref: {pack.refCount}"); } this._loadingFlags.Remove(assetName); @@ -322,7 +323,7 @@ public void UnloadAsset(string assetName, bool forceUnload = false) if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); return; } @@ -333,7 +334,7 @@ public void UnloadAsset(string assetName, bool forceUnload = false) // 引用計數-- pack.DelRef(); - Debug.Log($"Unload】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); + Logging.Print($"Unload】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}, ref: {this._cacher.TryGetValue(assetName, out var v)} {v?.refCount}"); if (forceUnload) { @@ -341,7 +342,7 @@ public void UnloadAsset(string assetName, bool forceUnload = false) this._cacher.Remove(assetName); Resources.UnloadUnusedAssets(); - Debug.Log($"Force Unload Completes】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"Force Unload Completes】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}"); } else if (this._cacher[assetName].refCount <= 0) { @@ -349,7 +350,7 @@ public void UnloadAsset(string assetName, bool forceUnload = false) this._cacher.Remove(assetName); Resources.UnloadUnusedAssets(); - Debug.Log($"Unload Completes】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}"); + Logging.Print($"Unload Completes】 => Current << CacheResource >> Cache Count: {this.Count}, asset: {assetName}"); } } } @@ -363,7 +364,7 @@ public void ReleaseAssets() { if (this.HasInLoadingFlags(assetName)) { - Debug.Log($"asset: {assetName} Loading..."); + Logging.Print($"asset: {assetName} Loading..."); continue; } @@ -377,7 +378,7 @@ public void ReleaseAssets() this._cacher.Clear(); Resources.UnloadUnusedAssets(); - Debug.Log($"【Release All】 => Current << CacheResource >> Cache Count: {this.Count}"); + Logging.Print($"【Release All】 => Current << CacheResource >> Cache Count: {this.Count}"); } #endregion } diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupBundle.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupBundle.cs index f522f497..7de6d9b6 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupBundle.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupBundle.cs @@ -1,6 +1,7 @@ using Cysharp.Threading.Tasks; using OxGFrame.AssetLoader.Cacher; using OxGFrame.AssetLoader.GroupCacher; +using OxGKit.LoggingSystem; using System.Linq; using UnityEngine; @@ -27,7 +28,7 @@ public async UniTask PreloadRawFileAsync(int id, string packageName, string[] as if (CacheBundle.GetInstance().HasInCache(assetName)) this.AddIntoCache(id, assetName); } - Debug.Log($"【Preload】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Preload】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); } public void PreloadRawFile(int id, string packageName, string[] assetNames, Progression progression = null) @@ -41,7 +42,7 @@ public void PreloadRawFile(int id, string packageName, string[] assetNames, Prog if (CacheBundle.GetInstance().HasInCache(assetName)) this.AddIntoCache(id, assetName); } - Debug.Log($"【Preload】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Preload】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); } /// @@ -64,7 +65,7 @@ public async UniTask LoadRawFileAsync(int id, string packageName, string a { keyGroup.AddRef(); - Debug.Log($"【Load】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); + Logging.Print($"【Load】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); } } @@ -85,7 +86,7 @@ public T LoadRawFile(int id, string packageName, string assetName, Progressio { keyGroup.AddRef(); - Debug.Log($"【Load】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); + Logging.Print($"【Load】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); } } @@ -99,21 +100,21 @@ public void UnloadRawFile(int id, string assetName, bool forceUnload = false) { keyGroup.DelRef(); - Debug.Log($"【Unload】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); + Logging.Print($"【Unload】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); // 強制釋放 if (forceUnload) { this.DelFromCache(id, keyGroup.assetName); - Debug.Log($"【Force Unload Completes】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Force Unload Completes】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); } // 使用引用計數釋放 else if (keyGroup.refCount <= 0) { this.DelFromCache(id, keyGroup.assetName); - Debug.Log($"【Unload Completes】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Unload Completes】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); } CacheBundle.GetInstance().UnloadRawFile(keyGroup.assetName, forceUnload); @@ -139,7 +140,7 @@ public void ReleaseRawFiles(int id) } } - Debug.Log($"【Release Group RawFiles】 => Current << GroupBundle >> Cache Count: {this.Count}"); + Logging.Print($"【Release Group RawFiles】 => Current << GroupBundle >> Cache Count: {this.Count}"); } #endregion @@ -155,7 +156,7 @@ public async UniTask PreloadAssetAsync(int id, string packageName, string[] a if (CacheBundle.GetInstance().HasInCache(assetName)) this.AddIntoCache(id, assetName); } - Debug.Log($"【Preload】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Preload】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); } public void PreloadAsset(int id, string packageName, string[] assetNames, Progression progression = null) where T : Object @@ -169,7 +170,7 @@ public void PreloadAsset(int id, string packageName, string[] assetNames, Pro if (CacheBundle.GetInstance().HasInCache(assetName)) this.AddIntoCache(id, assetName); } - Debug.Log($"【Preload】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Preload】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); } /// @@ -192,7 +193,7 @@ public async UniTask LoadAssetAsync(int id, string packageName, string ass { keyGroup.AddRef(); - Debug.Log($"【Load】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); + Logging.Print($"【Load】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); } } @@ -213,7 +214,7 @@ public T LoadAsset(int id, string packageName, string assetName, Progression { keyGroup.AddRef(); - Debug.Log($"【Load】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); + Logging.Print($"【Load】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); } } @@ -227,21 +228,21 @@ public void UnloadAsset(int id, string assetName, bool forceUnload = false) { keyGroup.DelRef(); - Debug.Log($"【Unload】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); + Logging.Print($"【Unload】 => Current << GroupBundle >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); // 強制釋放 if (forceUnload) { this.DelFromCache(id, keyGroup.assetName); - Debug.Log($"【Force Unload Completes】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Force Unload Completes】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); } // 使用引用計數釋放 else if (keyGroup.refCount <= 0) { this.DelFromCache(id, keyGroup.assetName); - Debug.Log($"【Unload Completes】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Unload Completes】 => Current << GroupBundle >> Cache Count: {this.Count}, GroupId: {id}"); } CacheBundle.GetInstance().UnloadAsset(keyGroup.assetName, forceUnload); @@ -267,7 +268,7 @@ public void ReleaseAssets(int id) } } - Debug.Log($"【Release Group Assets】 => Current << GroupBundle >> Cache Count: {this.Count}"); + Logging.Print($"【Release Group Assets】 => Current << GroupBundle >> Cache Count: {this.Count}"); } #endregion } diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupResource.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupResource.cs index 45326cba..ab034bc9 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupResource.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/GroupCacher/GroupResource.cs @@ -1,6 +1,7 @@ using Cysharp.Threading.Tasks; using OxGFrame.AssetLoader.Cacher; using OxGFrame.AssetLoader.GroupCacher; +using OxGKit.LoggingSystem; using System.Linq; using UnityEngine; @@ -22,7 +23,7 @@ public async UniTask PreloadAssetAsync(int id, string assetName, Progression await CacheResource.GetInstance().PreloadAssetAsync(assetName, progression); if (CacheResource.GetInstance().HasInCache(assetName)) this.AddIntoCache(id, assetName); - Debug.Log($"【Preload】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Preload】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); } public async UniTask PreloadAssetAsync(int id, string[] assetNames, Progression progression = null) where T : Object @@ -36,7 +37,7 @@ public async UniTask PreloadAssetAsync(int id, string[] assetNames, Progressi if (CacheResource.GetInstance().HasInCache(assetName)) this.AddIntoCache(id, assetName); } - Debug.Log($"【Preload】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Preload】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); } public void PreloadAsset(int id, string assetName, Progression progression = null) where T : Object @@ -46,7 +47,7 @@ public void PreloadAsset(int id, string assetName, Progression progression = CacheResource.GetInstance().PreloadAsset(assetName, progression); if (CacheResource.GetInstance().HasInCache(assetName)) this.AddIntoCache(id, assetName); - Debug.Log($"【Preload】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Preload】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); } public void PreloadAsset(int id, string[] assetNames, Progression progression = null) where T : Object @@ -60,7 +61,7 @@ public void PreloadAsset(int id, string[] assetNames, Progression progression if (CacheResource.GetInstance().HasInCache(assetName)) this.AddIntoCache(id, assetName); } - Debug.Log($"【Preload】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Preload】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); } /// @@ -83,7 +84,7 @@ public async UniTask LoadAssetAsync(int id, string assetName, Progression { keyGroup.AddRef(); - Debug.Log($"【Load】 => Current << GroupResource >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); + Logging.Print($"【Load】 => Current << GroupResource >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); } } @@ -104,7 +105,7 @@ public T LoadAsset(int id, string assetName, Progression progression = null) { keyGroup.AddRef(); - Debug.Log($"【Load】 => Current << GroupResource >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); + Logging.Print($"【Load】 => Current << GroupResource >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); } } @@ -118,21 +119,21 @@ public void UnloadAsset(int id, string assetName, bool forceUnload = false) { keyGroup.DelRef(); - Debug.Log($"【Unload】 => Current << GroupResource >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); + Logging.Print($"【Unload】 => Current << GroupResource >> Cache Count: {this.Count}, KeyRef: {keyGroup.refCount}, GroupId: {id}"); // 強制釋放 if (forceUnload) { this.DelFromCache(id, keyGroup.assetName); - Debug.Log($"【Force Unload Completes】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Force Unload Completes】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); } // 使用引用計數釋放 else if (keyGroup.refCount <= 0) { this.DelFromCache(id, keyGroup.assetName); - Debug.Log($"【Unload Completes】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); + Logging.Print($"【Unload Completes】 => Current << GroupResource >> Cache Count: {this.Count}, GroupId: {id}"); } CacheResource.GetInstance().UnloadAsset(keyGroup.assetName, forceUnload); @@ -158,7 +159,7 @@ public void ReleaseAssets(int id) } } - Debug.Log($"【Release All】 => Current << GroupResource >> Cache Count: {this.Count}"); + Logging.Print($"【Release All】 => Current << GroupResource >> Cache Count: {this.Count}"); } } } \ No newline at end of file diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Logger.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Logger.cs new file mode 100644 index 00000000..f0f2c0d1 --- /dev/null +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Logger.cs @@ -0,0 +1,7 @@ +using OxGKit.LoggingSystem; + +namespace OxGFrame.AssetLoader +{ + [LoggerName("OxGFrame.AssetLoader.Logger")] + public class Logger : Logging { } +} \ No newline at end of file diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Logger.cs.meta b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Logger.cs.meta new file mode 100644 index 00000000..aff990d6 --- /dev/null +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Logger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1f72b24b6d576d74dad43cb6e6192b53 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/OxGFrame.AssetLoader.Runtime.asmdef b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/OxGFrame.AssetLoader.Runtime.asmdef index e5caed4c..6c7a146b 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/OxGFrame.AssetLoader.Runtime.asmdef +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/OxGFrame.AssetLoader.Runtime.asmdef @@ -7,7 +7,8 @@ "GUID:e34a5702dd353724aa315fb8011f08c3", "GUID:f22fac247a56d2d41b687bb0d900e54e", "GUID:c55575a9f1747c240822f4b7e0400716", - "GUID:f3b8d4b152174ca47b578c325544e581" + "GUID:f3b8d4b152174ca47b578c325544e581", + "GUID:981f0bbbcbf62b74c9821862b0cd0202" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Utility/BundleUtility.cs b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Utility/BundleUtility.cs index 4c3ba059..1a9c01ee 100644 --- a/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Utility/BundleUtility.cs +++ b/Assets/OxGFrame/AssetLoader/Scripts/Runtime/Utility/BundleUtility.cs @@ -6,6 +6,7 @@ using UnityEngine; using System.Threading; using System.Collections.Generic; +using OxGKit.LoggingSystem; namespace OxGFrame.AssetLoader.Utility { @@ -243,8 +244,8 @@ public static async UniTask RequestAndCopyFileFromStreamingAssets(string sourceF if (request.result == UnityWebRequest.Result.ProtocolError || request.result == UnityWebRequest.Result.ConnectionError) { - Debug.Log("Request failed. Cannot found file in StreamingAssets."); - Debug.Log(request.error); + Logging.Print("Request failed. Cannot found file in StreamingAssets."); + Logging.Print(request.error); } else { diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/CHANGELOG.md b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/CHANGELOG.md index 312421af..d9f8ff66 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/CHANGELOG.md +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/CHANGELOG.md @@ -2,6 +2,41 @@ All notable changes to this package will be documented in this file. +## [1.5.4-preview] - 2023-08-25 + +优化了资源清单文件构建速度(极大提升构建体验)(感谢yingnierxiao同学)。 + +### Fixed + +- (#130) 修复了打包路径无效问题bug +- (#138) 修复了Unity不支持的格式的原生文件会报warning + +### Added + +- 新增了IBuildinQueryServices 接口。 + +### Changed + +- 在开启可寻址模式下,默认支持通过资源路径加载资源对象。 + +- 优化了资源收集界面,增加了配置相关的警示提示。 + +- 优化了资源报告界面,增加了BundleView界面里的builtin资源的列表显示。 + +- IQueryServices接口变更为IBuildinQueryServices接口 + +- EOperationStatus增加了正在处理的状态。 + + ```c# + public enum EOperationStatus + { + None, + Processing, + Succeed, + Failed + } + ``` + ## [1.5.3-preview] - 2023-07-28 ### Fixed diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/FixBuildTasks.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/ExtdBuildTasks.cs similarity index 100% rename from Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/FixBuildTasks.cs rename to Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/ExtdBuildTasks.cs diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/ExtdBuildTasks.cs.meta b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/ExtdBuildTasks.cs.meta new file mode 100644 index 00000000..015455c5 --- /dev/null +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/ExtdBuildTasks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f01d5c82be95c8f4b93aeefc0454ae5c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/SBPBuildTasks.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/SBPBuildTasks.cs index ae66bd43..71056e61 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/SBPBuildTasks.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/SBPBuildTasks.cs @@ -33,20 +33,20 @@ public static IList Create(string builtInShaderBundleName) // Packing buildTasks.Add(new GenerateBundlePacking()); - buildTasks.Add(new RemoveSpriteAtlasRedundancy()); // Fix for SpriteAtlas Redundancy - buildTasks.Add(new UpdateBundleObjectLayout()); + buildTasks.Add(new RemoveSpriteAtlasRedundancy()); // Fix for SpriteAtlas Redundancy + buildTasks.Add(new UpdateBundleObjectLayout()); buildTasks.Add(new GenerateBundleCommands()); buildTasks.Add(new GenerateSubAssetPathMaps()); buildTasks.Add(new GenerateBundleMaps()); buildTasks.Add(new PostPackingCallback()); - + // Writing buildTasks.Add(new WriteSerializedFiles()); buildTasks.Add(new ArchiveAndCompressBundles()); buildTasks.Add(new AppendBundleHash()); buildTasks.Add(new GenerateLinkXml()); buildTasks.Add(new PostWritingCallback()); - + return buildTasks; } } diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateManifest.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateManifest.cs index a4a10da6..327693fb 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateManifest.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleBuilder/BuildTasks/TaskCreateManifest.cs @@ -40,7 +40,12 @@ private void CreateManifestFile(BuildContext context) manifest.OutputNameStyle = (int)buildParameters.OutputNameStyle; manifest.PackageName = buildParameters.PackageName; manifest.PackageVersion = buildParameters.PackageVersion; + + // 填充资源包集合 manifest.BundleList = GetAllPackageBundle(context); + CacheBundleIDs(manifest); + + // 填充主资源集合 manifest.AssetList = GetAllPackageAsset(context, manifest); // 更新Unity内置资源包的引用关系 @@ -147,7 +152,7 @@ private List GetAllPackageAsset(BuildContext context, PackageManif packageAsset.AssetPath = assetInfo.AssetPath; packageAsset.AssetGUID = buildMapContext.Command.IncludeAssetGUID ? assetInfo.AssetGUID : string.Empty; packageAsset.AssetTags = assetInfo.AssetTags.ToArray(); - packageAsset.BundleID = GetAssetBundleID(assetInfo.BundleName, manifest); + packageAsset.BundleID = GetCachedBundleID(assetInfo.BundleName); packageAsset.DependIDs = GetAssetBundleDependIDs(packageAsset.BundleID, assetInfo, manifest); result.Add(packageAsset); } @@ -156,12 +161,12 @@ private List GetAllPackageAsset(BuildContext context, PackageManif } private int[] GetAssetBundleDependIDs(int mainBundleID, BuildAssetInfo assetInfo, PackageManifest manifest) { - List result = new List(); + HashSet result = new HashSet(); foreach (var dependAssetInfo in assetInfo.AllDependAssetInfos) { if (dependAssetInfo.HasBundleName()) { - int bundleID = GetAssetBundleID(dependAssetInfo.BundleName, manifest); + int bundleID = GetCachedBundleID(dependAssetInfo.BundleName); if (mainBundleID != bundleID) { if (result.Contains(bundleID) == false) @@ -171,15 +176,6 @@ private int[] GetAssetBundleDependIDs(int mainBundleID, BuildAssetInfo assetInfo } return result.ToArray(); } - private int GetAssetBundleID(string bundleName, PackageManifest manifest) - { - for (int index = 0; index < manifest.BundleList.Count; index++) - { - if (manifest.BundleList[index].BundleName == bundleName) - return index; - } - throw new Exception($"Not found bundle name : {bundleName}"); - } /// /// 更新Unity内置资源包的引用关系 @@ -212,7 +208,7 @@ private void UpdateBuiltInBundleReference(PackageManifest manifest, TaskBuilding List conflictAssetPathList = dependBundles.Intersect(shaderBundleReferenceList).ToList(); if (conflictAssetPathList.Count > 0) { - List newDependIDs = new List(packageAsset.DependIDs); + HashSet newDependIDs = new HashSet(packageAsset.DependIDs); if (newDependIDs.Contains(shaderBundleId) == false) newDependIDs.Add(shaderBundleId); packageAsset.DependIDs = newDependIDs.ToArray(); @@ -226,7 +222,7 @@ private void UpdateBuiltInBundleReference(PackageManifest manifest, TaskBuilding // 更新资源包标签 var packageBundle = manifest.BundleList[shaderBundleId]; - List newTags = new List(packageBundle.Tags); + HashSet newTags = new HashSet(packageBundle.Tags); foreach (var tag in tagTemps) { if (newTags.Contains(tag) == false) @@ -250,23 +246,22 @@ private List GetPackageAssetAllDependBundles(PackageManifest manifest, P #region 资源包引用关系相关 private readonly Dictionary _cachedBundleID = new Dictionary(10000); private readonly Dictionary _cachedBundleDepends = new Dictionary(10000); + + private void CacheBundleIDs(PackageManifest manifest) + { + UnityEngine.Debug.Assert(manifest.BundleList.Count != 0, "Manifest bundle list is empty !"); + for (int index = 0; index < manifest.BundleList.Count; index++) + { + string bundleName = manifest.BundleList[index].BundleName; + _cachedBundleID.Add(bundleName, index); + } + } private void UpdateScriptPipelineReference(PackageManifest manifest, TaskBuilding_SBP.BuildResultContext buildResultContext) { int progressValue; int totalCount = manifest.BundleList.Count; - // 缓存资源包ID - _cachedBundleID.Clear(); - progressValue = 0; - foreach (var packageBundle in manifest.BundleList) - { - int bundleID = GetAssetBundleID(packageBundle.BundleName, manifest); - _cachedBundleID.Add(packageBundle.BundleName, bundleID); - EditorTools.DisplayProgressBar("缓存资源包索引", ++progressValue, totalCount); - } - EditorTools.ClearProgressBar(); - // 缓存资源包依赖 _cachedBundleDepends.Clear(); progressValue = 0; @@ -283,7 +278,11 @@ private void UpdateScriptPipelineReference(PackageManifest manifest, TaskBuildin var depends = buildResultContext.Results.BundleInfos[packageBundle.BundleName].Dependencies; _cachedBundleDepends.Add(packageBundle.BundleName, depends); - EditorTools.DisplayProgressBar("缓存资源包依赖列表", ++progressValue, totalCount); + int pro = ++progressValue; + if (pro % 100 == 0) + { + EditorTools.DisplayProgressBar("缓存资源包依赖列表", pro, totalCount); + } } EditorTools.ClearProgressBar(); @@ -291,7 +290,11 @@ private void UpdateScriptPipelineReference(PackageManifest manifest, TaskBuildin foreach (var packageBundle in manifest.BundleList) { packageBundle.ReferenceIDs = GetBundleRefrenceIDs(manifest, packageBundle); - EditorTools.DisplayProgressBar("计算资源包引用关系", ++progressValue, totalCount); + int pro = ++progressValue; + if (pro % 100 == 0) + { + EditorTools.DisplayProgressBar("计算资源包引用关系", pro, totalCount); + } } EditorTools.ClearProgressBar(); } @@ -300,17 +303,6 @@ private void UpdateBuiltinPipelineReference(PackageManifest manifest, TaskBuildi int progressValue; int totalCount = manifest.BundleList.Count; - // 缓存资源包ID - _cachedBundleID.Clear(); - progressValue = 0; - foreach (var packageBundle in manifest.BundleList) - { - int bundleID = GetAssetBundleID(packageBundle.BundleName, manifest); - _cachedBundleID.Add(packageBundle.BundleName, bundleID); - EditorTools.DisplayProgressBar("缓存资源包索引", ++progressValue, totalCount); - } - EditorTools.ClearProgressBar(); - // 缓存资源包依赖 _cachedBundleDepends.Clear(); progressValue = 0; @@ -324,7 +316,11 @@ private void UpdateBuiltinPipelineReference(PackageManifest manifest, TaskBuildi var depends = buildResultContext.UnityManifest.GetDirectDependencies(packageBundle.BundleName); _cachedBundleDepends.Add(packageBundle.BundleName, depends); - EditorTools.DisplayProgressBar("缓存资源包依赖列表", ++progressValue, totalCount); + int pro = ++progressValue; + if (pro % 100 == 0) + { + EditorTools.DisplayProgressBar("缓存资源包依赖列表", pro, totalCount); + } } EditorTools.ClearProgressBar(); @@ -333,7 +329,11 @@ private void UpdateBuiltinPipelineReference(PackageManifest manifest, TaskBuildi foreach (var packageBundle in manifest.BundleList) { packageBundle.ReferenceIDs = GetBundleRefrenceIDs(manifest, packageBundle); - EditorTools.DisplayProgressBar("计算资源包引用关系", ++progressValue, totalCount); + int pro = ++progressValue; + if (pro % 100 == 0) + { + EditorTools.DisplayProgressBar("计算资源包引用关系", ++progressValue, totalCount); + } } EditorTools.ClearProgressBar(); } @@ -354,7 +354,7 @@ private int[] GetBundleRefrenceIDs(PackageManifest manifest, PackageBundle targe } } - List result = new List(); + HashSet result = new HashSet(); foreach (var bundleName in referenceList) { int bundleID = GetCachedBundleID(bundleName); diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs index 069f8707..2871f945 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs @@ -111,7 +111,7 @@ public List GetPackageAllTags(string packageName) public CollectResult GetPackageAssets(EBuildMode buildMode, string packageName) { if (string.IsNullOrEmpty(packageName)) - throw new Exception("Build package name is null or mepty !"); + throw new Exception("Build package name is null or empty !"); var package = GetPackage(packageName); CollectCommand command = new CollectCommand(buildMode, packageName, @@ -131,7 +131,7 @@ public AssetBundleCollectorPackage GetPackage(string packageName) if (package.PackageName == packageName) return package; } - throw new Exception($"Not found pacakge : {packageName}"); + throw new Exception($"Not found package : {packageName}"); } } } \ No newline at end of file diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/EditorTools.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/EditorTools.cs index cb5f0617..1a82b36a 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/EditorTools.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Editor/EditorTools.cs @@ -153,7 +153,7 @@ public static string[] FindAssets(EAssetSearchType searchType, string[] searchIn guids = AssetDatabase.FindAssets($"t:{searchType}", searchInFolders); // 注意:AssetDatabase.FindAssets()可能会获取到重复的资源 - List result = new List(); + HashSet result = new HashSet(); for (int i = 0; i < guids.Length; i++) { string guid = guids[i]; diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/DownloadSystem/Downloader/FileGeneralDownloader.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/DownloadSystem/Downloader/FileGeneralDownloader.cs index c9fca2b4..5d737bf4 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/DownloadSystem/Downloader/FileGeneralDownloader.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/DownloadSystem/Downloader/FileGeneralDownloader.cs @@ -51,6 +51,9 @@ public override void Update() // 准备下载 if (_steps == ESteps.PrepareDownload) { + // 获取请求地址 + _requestURL = GetRequestURL(); + // 重置变量 _downloadProgress = 0f; _downloadedBytes = 0; @@ -59,14 +62,16 @@ public override void Update() _isAbort = false; _latestDownloadBytes = 0; _latestDownloadRealtime = Time.realtimeSinceStartup; + + // 重置计时器 + if(_tryAgainTimer > 0f) + YooLogger.Warning($"Try again download : {_requestURL}"); _tryAgainTimer = 0f; // 删除临时文件 if (File.Exists(_tempFilePath)) File.Delete(_tempFilePath); - // 获取请求地址 - _requestURL = GetRequestURL(); _steps = ESteps.CreateDownloader; } @@ -197,7 +202,6 @@ public override void Update() _failedTryAgain--; _steps = ESteps.PrepareDownload; ReportWarning(); - YooLogger.Warning($"Try again download : {_requestURL}"); } } } diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/DownloadSystem/Downloader/FileResumeDownloader.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/DownloadSystem/Downloader/FileResumeDownloader.cs index 070f7c45..f117d14a 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/DownloadSystem/Downloader/FileResumeDownloader.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/DownloadSystem/Downloader/FileResumeDownloader.cs @@ -91,6 +91,9 @@ public override void Update() // 创建下载器 if (_steps == ESteps.PrepareDownload) { + // 获取请求地址 + _requestURL = GetRequestURL(); + // 重置变量 _downloadProgress = 0f; _downloadedBytes = 0; @@ -99,11 +102,13 @@ public override void Update() _isAbort = false; _latestDownloadBytes = 0; _latestDownloadRealtime = Time.realtimeSinceStartup; - _tryAgainTimer = 0f; _fileOriginLength = 0; - // 获取请求地址 - _requestURL = GetRequestURL(); + // 重置计时器 + if (_tryAgainTimer > 0f) + YooLogger.Warning($"Try again download : {_requestURL}"); + _tryAgainTimer = 0f; + _steps = ESteps.CreateDownloader; } @@ -257,7 +262,6 @@ public override void Update() _failedTryAgain--; _steps = ESteps.PrepareDownload; ReportWarning(); - YooLogger.Warning($"Try again download : {_requestURL}"); } } } diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs index 6f46416f..029c7aa0 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/OperationSystem/AsyncOperationBase.cs @@ -74,14 +74,14 @@ public Task Task internal abstract void Start(); internal abstract void Update(); - internal void OnFinish() + internal void SetFinish() { Progress = 1f; _callback?.Invoke(this); if (_taskCompletionSource != null) _taskCompletionSource.TrySetResult(null); } - internal void OnStart() + internal void SetStart() { Status = EOperationStatus.Processing; } diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/OperationSystem/OperationSystem.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/OperationSystem/OperationSystem.cs index 0c12a54e..ff416d99 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/OperationSystem/OperationSystem.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/OperationSystem/OperationSystem.cs @@ -67,7 +67,7 @@ public static void Update() if (operation.IsDone) { _removeList.Add(operation); - operation.OnFinish(); + operation.SetFinish(); } } @@ -101,7 +101,7 @@ public static void DestroyAll() public static void StartOperation(AsyncOperationBase operation) { _addList.Add(operation); - operation.OnStart(); + operation.SetStart(); operation.Start(); } } diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/PackageSystem/Operations/Internal/DeserializeManifestOperation.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/PackageSystem/Operations/Internal/DeserializeManifestOperation.cs index c45da5e4..8e0c698c 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/PackageSystem/Operations/Internal/DeserializeManifestOperation.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/PackageSystem/Operations/Internal/DeserializeManifestOperation.cs @@ -208,6 +208,10 @@ internal override void Update() packageBundle.ParseBundle(Manifest.PackageName, Manifest.OutputNameStyle); Manifest.BundleDic.Add(packageBundle.BundleName, packageBundle); + // 注意:原始文件可能存在相同的CacheGUID + if (Manifest.CacheGUIDs.Contains(packageBundle.CacheGUID) == false) + Manifest.CacheGUIDs.Add(packageBundle.CacheGUID); + _packageBundleCount--; Progress = 1f - _packageBundleCount / _progressTotalValue; if (OperationSystem.IsBusy) diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/PackageSystem/PackageManifest.cs b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/PackageSystem/PackageManifest.cs index 881b9353..4db89264 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/PackageSystem/PackageManifest.cs +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/PackageSystem/PackageManifest.cs @@ -82,6 +82,12 @@ internal class PackageManifest [NonSerialized] public Dictionary AssetPathMapping2; + /// + /// 该资源清单所有文件的缓存GUID集合 + /// + [NonSerialized] + public HashSet CacheGUIDs = new HashSet(); + /// /// 尝试映射为资源路径 @@ -191,12 +197,7 @@ public bool TryGetPackageBundle(string bundleName, out PackageBundle result) /// public bool IsIncludeBundleFile(string cacheGUID) { - foreach (var packageBundle in BundleList) - { - if (packageBundle.CacheGUID == cacheGUID) - return true; - } - return false; + return CacheGUIDs.Contains(cacheGUID); } /// diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/YooAsset.asmdef b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/YooAsset.asmdef index d906ae12..e61c9d1b 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/YooAsset.asmdef +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/Runtime/YooAsset.asmdef @@ -1,5 +1,6 @@ { "name": "YooAsset", + "rootNamespace": "", "references": [], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/package.json b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/package.json index 58eda812..9f057942 100644 --- a/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/package.json +++ b/Assets/OxGFrame/AssetLoader/ThirdParty/YooAsset/package.json @@ -1,7 +1,7 @@ { "name": "com.tuyoogame.yooasset", "displayName": "YooAsset", - "version": "1.5.3-preview", + "version": "1.5.4-preview", "unity": "2019.4", "description": "unity3d resources management system.", "author": { diff --git a/Assets/OxGFrame/CHANGELOG.md b/Assets/OxGFrame/CHANGELOG.md index 98f5dfc9..1460067b 100644 --- a/Assets/OxGFrame/CHANGELOG.md +++ b/Assets/OxGFrame/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## [2.7.7] - 2023-08-27 +- Updated YooAsset to 1.5.4-perview. +- Installed OxGKit.LoggingSystem for all modules log print. + - Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts to Package Manager + +**Note: Must install OxGKit.LoggingSystem, becuase all modules log are dependent it.** + ## [2.7.6] - 2023-08-24 - Optimized AudioBase and VideoBase of MediaFrame update behaviour call by MediaManager. - Updated YooAsset new commit files. @@ -8,7 +15,7 @@ - Optimized UIBase and SRBase of CoreFrame update behaviour call by FrameManager. - Optimized CPBase of CoreFrame update behaviour, if need to update have to call by self to drive. - Added DriveSelfUpdate(float dt) method in CPBase (drive by self). -``` +```C# public class NewTplCP : CPBase { private void Update() @@ -27,7 +34,7 @@ public class NewTplCP : CPBase - Updated part of UniFramework. #### CoreFrames (UIFrame, SRFrame) - Added API. -``` +```C# public static void SendRefreshData(string assetName, object data = null) public static void SendRefreshData(string[] assetNames, object[] data = null) @@ -35,7 +42,7 @@ public class NewTplCP : CPBase #### AssetPatcher - Added API. Common -``` +```C# public struct DownloadInfo { public int totalCount; @@ -47,7 +54,7 @@ Common public static async UniTask BeginDownloadWithCombineDownloaders(ResourceDownloaderOperation[] downloaders, OnDownloadSpeedProgress onDownloadSpeedProgress = null, OnDownloadError onDownloadError = null) ``` Get Downloader -``` +```C# // All public static ResourceDownloaderOperation[] GetDownloadersWithCombinePackages(ResourcePackage[] packages) @@ -69,7 +76,7 @@ Get Downloader public static ResourceDownloaderOperation[] GetDownloadersWithCombinePackagesByAssetInfos(ResourcePackage[] packages, int maxConcurrencyDownloadCount, int failedRetryCount, params AssetInfo[] assetInfos) ``` Begin Download -``` +```C# // All public static async UniTask BeginDownloadWithCombinePackages(ResourcePackage[] packages, OnDownloadSpeedProgress onDownloadSpeedProgress = null, OnDownloadError onDownloadError = null) @@ -91,7 +98,7 @@ Begin Download public static async UniTask BeginDownloadWithCombinePackagesByAssetInfos(ResourcePackage[] packages, int maxConcurrencyDownloadCount, int failedRetryCount, AssetInfo[] assetInfos = null, OnDownloadSpeedProgress onDownloadSpeedProgress = null, OnDownloadError onDownloadError = null) ``` Get Download Info -``` +```C# // All public static DownloadInfo GetDownloadInfoWithCombinePackages(ResourcePackage[] packages) @@ -111,7 +118,7 @@ Get Download Info ## [2.7.1] - 2023-08-05 - Added Default API in GSIManagerBase (protected GetInstance() method). -``` +```C# public static int GetCurrentId() public static U GetStage() where U : GSIBase @@ -120,7 +127,7 @@ Get Download Info public static void AddStage() where U : GSIBase, new() - public void AddStage(int id) where U : GSIBase, new() + public static void AddStage(int id) where U : GSIBase, new() public static void AddStage(int id, GSIBase gameStage) @@ -133,7 +140,7 @@ Get Download Info public static void Update(float dt = 0.0f) ``` - Added Default API in CenterBase (removed Default API from subtype). -``` +```C# public static void Add() where UClass : TClass, new() public static void Add(int id) where UClass : TClass, new() @@ -256,7 +263,7 @@ Get Download Info ## [2.3.1] - 2023-06-19 - Added bind collector can use GetNodeComponent(string nodeName) to get component. -``` +```C# // Single collector.GetNodeComponent("BindName"); @@ -320,7 +327,7 @@ collector.GetNodeComponents("BindName"); ## [2.1.4] - 2023-05-15 - Added DownloadSpeedCalculator (using OxGFrame.AssetLoader.Utility). -``` +```C# var packageName = "DlcPackage"; bool isInitialized = await AssetPatcher.InitDlcPackage(packageName, "dlcVersion", true); if (isInitialized) @@ -386,7 +393,7 @@ if (isInitialized) - Extended CoreFrames.USFrame methods (LoadSingleSceneAsync and LoadAdditiveSceneAsync). - Extended load asset and download from specific package. - Optimized code. -``` +```C# // [Load asset and download from specific package] var packageName = "OtherPackage"; await AssetPatcher.InitPackage(packageName, true, "127.0.0.1/package", "127.0.0.1/package"); diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Editor/BindCodeSetting.cs b/Assets/OxGFrame/CoreFrame/Scripts/Editor/BindCodeSetting.cs index ecb33924..9820b92c 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Editor/BindCodeSetting.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Editor/BindCodeSetting.cs @@ -107,6 +107,8 @@ public string GetIndicateModifier() public void SortTailRules() { this.tailRules.Sort(); + EditorUtility.SetDirty(this); + AssetDatabase.SaveAssets(); } #endregion } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Common/Binder.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Common/Binder.cs index 59449d7d..b6a0222c 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Common/Binder.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Common/Binder.cs @@ -1,4 +1,5 @@ using OxGFrame.CoreFrame.CPFrame; +using OxGKit.LoggingSystem; using UnityEngine; namespace OxGFrame.CoreFrame @@ -58,7 +59,7 @@ private static void _BindIntoCollector(string name, GameObject go, FrameBase fBa // 再去判斷取得後的字串陣列是否綁定格式資格 if (heads == null || heads.Length < 2 || !FrameConfig.BIND_COMPONENTS.ContainsKey(bindType)) { - Debug.Log($"{name} => Naming format error. Please check the bind name."); + Logging.Print($"{name} => Naming format error. Please check the bind name."); return; } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs index 52c7de68..1eb3d62e 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/Implement/FrameManager.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using OxGFrame.AssetLoader; +using OxGKit.LoggingSystem; using System; using System.Collections.Generic; using System.Linq; @@ -321,7 +322,7 @@ protected async UniTask LoadIntoAllCache(string packageName, string assetName // 如果允許多實例 & 預加載模式, 則直接返回 (主要是 Cacher 已經有加載資源了) if (stack.allowInstantiate && isPreloadMode) { - Debug.Log($"{stack.assetName} => 【Allow Instantiate + Preload Mode】skip cache process."); + Logging.Print($"{stack.assetName} => 【Allow Instantiate + Preload Mode】skip cache process."); return null; } // 允所多實例時, 需要重覆加載 (確保 ref 正確, 不過會多 1 次, 需要額外減去) @@ -567,7 +568,7 @@ protected virtual void Destroy(T fBase, string assetName) // 額外卸載 AssetLoaders.UnloadAsset(assetName); - Debug.Log($"[FrameManager] Extra Unload Asset: {assetName}"); + Logging.Print($"[FrameManager] Extra Unload Asset: {assetName}"); } // 柱列為空, 則刪除資源緩存 @@ -576,9 +577,9 @@ protected virtual void Destroy(T fBase, string assetName) // 卸載 AssetLoaders.UnloadAsset(assetName); - Debug.Log($"[FrameManager] Unload Asset: {assetName}"); + Logging.Print($"[FrameManager] Unload Asset: {assetName}"); - Debug.Log($"[FrameManager] Destroy Object: {assetName}"); + Logging.Print($"[FrameManager] Destroy Object: {assetName}"); } #endregion diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs index 6826a8c2..16624472 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/SRFrame/SRManager.cs @@ -2,6 +2,7 @@ using OxGFrame.AssetLoader; using Cysharp.Threading.Tasks; using UnityEngine; +using OxGKit.LoggingSystem; namespace OxGFrame.CoreFrame.SRFrame { @@ -121,7 +122,7 @@ public override async UniTask Show(int groupId, string packageName, stri srBase.SetHidden(false); await this.LoadAndDisplay(srBase, obj); - Debug.Log($"Show SR: {assetName}"); + Logging.Print($"Show SR: {assetName}"); this.CloseAwaiting(awaitingUIAssetName); // 執行完畢後, 關閉預顯加載 UI @@ -167,7 +168,7 @@ private void _Close(string assetName, bool disablePreClose, bool forceDestroy, b else if (srBase.onCloseAndDestroy) this.Destroy(srBase, assetName); } - Debug.Log($"Close SR: {assetName}"); + Logging.Print($"Close SR: {assetName}"); } public override void Close(string assetName, bool disablePreClose = false, bool forceDestroy = false) @@ -282,7 +283,7 @@ private void _Reveal(string assetName) this.LoadAndDisplay(srBase).Forget(); - Debug.Log($"Reveal SR: {assetName}"); + Logging.Print($"Reveal SR: {assetName}"); } } @@ -351,7 +352,7 @@ private void _Hide(string assetName) this.ExitAndHide(srBase); } - Debug.Log($"Hide SR: {assetName}"); + Logging.Print($"Hide SR: {assetName}"); } public override void Hide(string assetName) diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIFreezeManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIFreezeManager.cs index 77a1dfce..ad51861c 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIFreezeManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIFreezeManager.cs @@ -1,4 +1,5 @@ -using System.Collections; +using OxGKit.LoggingSystem; +using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -56,7 +57,7 @@ public bool RecycleUIFreeze(Transform parent) GameObject uiFreezeNode = parent.Find(nodeName).gameObject; if (uiFreezeNode == null || !uiFreezeNode.GetComponent()) { - Debug.Log(string.Format("No matching object found: {0}, doesn't need to recycle!", nodeName)); + Logging.Print(string.Format("No matching object found: {0}, doesn't need to recycle!", nodeName)); return false; } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs index dd5e1108..588756af 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIManager.cs @@ -4,6 +4,7 @@ using Cysharp.Threading.Tasks; using UnityEngine.UI; using OxGFrame.AssetLoader; +using OxGKit.LoggingSystem; namespace OxGFrame.CoreFrame.UIFrame { @@ -98,7 +99,7 @@ private bool _SetupAndCheckUICanvas(string canvasName) } else { - Debug.Log($"【Setup Failed】Not found UICanvas: {canvasName}"); + Logging.Print($"【Setup Failed】Not found UICanvas: {canvasName}"); return false; } @@ -211,7 +212,7 @@ protected override UIBase Instantiate(UIBase uiBase, string assetName, AddIntoCa if (uiCanvas == null) { - Debug.Log($"【Loading Failed】Not found UICanvas: {uiBase.uiSetting.canvasName}"); + Logging.Print($"【Loading Failed】Not found UICanvas: {uiBase.uiSetting.canvasName}"); return null; } @@ -276,7 +277,7 @@ protected override bool SetParent(UIBase uiBase, Transform parent) var uiCanvas = this.GetUICanvas(uiBase.uiSetting.canvasName); if (uiCanvas == null) { - Debug.Log($"When UI [{uiBase.assetName}] to set parent failed. Not found UICanvas: [{uiBase.uiSetting.canvasName}]"); + Logging.Print($"When UI [{uiBase.assetName}] to set parent failed. Not found UICanvas: [{uiBase.uiSetting.canvasName}]"); return false; } @@ -410,7 +411,7 @@ public override async UniTask Show(int groupId, string packageName, stri await this.LoadAndDisplay(uiBase, obj); this.LoadAndDisplayReverse(uiBase, obj); - Debug.Log($"Show UI: {assetName}"); + Logging.Print($"Show UI: {assetName}"); this.CloseAwaiting(awaitingUIAssetName); // 執行完畢後, 關閉預顯加載 UI @@ -456,7 +457,7 @@ private ReverseCache _PreprocessRemoveReserveSafety(bool doRemoveSafety, UIBase this._dictReverse[key].RemoveAt(i); // 額外計算堆疊數 (用於校正堆疊計數) reverseCache.extraStack++; - Debug.Log($"[pre-forceDestroy process] Remove {uiBase.assetName} from reverse cache."); + Logging.Print($"[pre-forceDestroy process] Remove {uiBase.assetName} from reverse cache."); } } reverseCache.uiBase = equalsTop; @@ -533,7 +534,7 @@ private void _Close(string assetName, bool disablePreClose, bool forceDestroy, b else if (uiBase.onCloseAndDestroy) this.Destroy(uiBase, assetName); } - Debug.Log($"Close UI: {assetName}"); + Logging.Print($"Close UI: {assetName}"); } public override void Close(string assetName, bool disablePreClose = false, bool forceDestroy = false) @@ -651,7 +652,7 @@ private void _Reveal(string assetName) this.LoadAndDisplay(uiBase).Forget(); - Debug.Log($"Reveal UI: {assetName}"); + Logging.Print($"Reveal UI: {assetName}"); } } @@ -720,7 +721,7 @@ private void _Hide(string assetName) this.ExitAndHide(uiBase); } - Debug.Log($"Hide UI: {assetName}"); + Logging.Print($"Hide UI: {assetName}"); } public override void Hide(string assetName) @@ -830,7 +831,7 @@ protected async UniTask LoadAndDisplay(UIBase uiBase, object obj = null, bool do // 堆疊層數++ this._dictStackCounter[key]++; - Debug.Log($"[UI Stack Layer] Canvas: {uiBase.uiSetting.canvasName}, Layer: {uiBase.uiSetting.nodeType}, Stack Count: {this._dictStackCounter[key]}"); + Logging.Print($"[UI Stack Layer] Canvas: {uiBase.uiSetting.canvasName}, Layer: {uiBase.uiSetting.nodeType}, Stack Count: {this._dictStackCounter[key]}"); // 最大差值 -1 是為了保留給下一階層 if (this._dictStackCounter[key] >= (UIConfig.ORDER_DIFFERENCE - 1)) { @@ -866,7 +867,7 @@ protected void ExitAndHide(UIBase uiBase, bool disablePreClose = false, int extr { // 堆疊層數-- this._dictStackCounter[key] = (extraStack > 0) ? this._dictStackCounter[key] - extraStack : --this._dictStackCounter[key]; - Debug.Log($"[UI Stack Layer] Canvas: {uiBase.uiSetting.canvasName}, Layer: {uiBase.uiSetting.nodeType} => Stack Count: {this._dictStackCounter[key]}"); + Logging.Print($"[UI Stack Layer] Canvas: {uiBase.uiSetting.canvasName}, Layer: {uiBase.uiSetting.nodeType} => Stack Count: {this._dictStackCounter[key]}"); if (this._dictStackCounter[key] <= 0) this._dictStackCounter.Remove(key); } } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIMaskManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIMaskManager.cs index a1b74734..c704aa23 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIMaskManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/UIFrame/UIMaskManager.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using OxGKit.LoggingSystem; +using System.Collections.Generic; using UnityEngine; namespace OxGFrame.CoreFrame.UIFrame @@ -55,7 +56,7 @@ public bool RecycleUIMask(Transform parent) GameObject uiMaskNode = parent.Find(nodeName).gameObject; if (uiMaskNode == null || !uiMaskNode.GetComponent()) { - Debug.Log(string.Format("No matching object found: {0}, doesn't need to recycle!", nodeName)); + Logging.Print(string.Format("No matching object found: {0}, doesn't need to recycle!", nodeName)); return false; } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/USFrame/USManager.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/USFrame/USManager.cs index 9448b988..c9481e14 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/USFrame/USManager.cs +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Core/USFrame/USManager.cs @@ -1,6 +1,7 @@ using Cysharp.Threading.Tasks; using OxGFrame.AssetLoader; using OxGFrame.AssetLoader.Cacher; +using OxGKit.LoggingSystem; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; @@ -105,14 +106,14 @@ public async UniTask LoadFromBundleAsync(string packageName, string var scene = this.GetSceneByName(sceneName); if (!string.IsNullOrEmpty(scene.name) && scene.isLoaded && loadSceneMode == LoadSceneMode.Single) { - Debug.LogWarning($"【US】Single Scene => {sceneName} already exists!!!"); + Logging.PrintWarning($"【US】Single Scene => {sceneName} already exists!!!"); return null; } var pack = await AssetLoaders.LoadSceneAsync(packageName, sceneName, loadSceneMode, activateOnLoad, priority, progression); if (pack != null) { - Debug.Log($"Load Scene From Bundle => sceneName: {sceneName}, mode: {loadSceneMode}"); + Logging.Print($"Load Scene From Bundle => sceneName: {sceneName}, mode: {loadSceneMode}"); return pack; } @@ -140,7 +141,7 @@ public async UniTask LoadFromBuildAsync(string sceneName, LoadSc var scene = this.GetSceneByName(sceneName); if (!string.IsNullOrEmpty(scene.name) && scene.isLoaded && loadSceneMode == LoadSceneMode.Single) { - Debug.LogWarning($"【US】Single Scene => {sceneName} already exists!!!"); + Logging.PrintWarning($"【US】Single Scene => {sceneName} already exists!!!"); return null; } @@ -163,7 +164,7 @@ public async UniTask LoadFromBuildAsync(string sceneName, LoadSc await UniTask.Yield(); } - Debug.Log($"Load Scene From Build => sceneName: {sceneName}, mode: {loadSceneMode}"); + Logging.Print($"Load Scene From Build => sceneName: {sceneName}, mode: {loadSceneMode}"); } return req; @@ -178,7 +179,7 @@ public async UniTask LoadFromBuildAsync(int buildIndex, LoadScen string sceneName = scene.name; if (!string.IsNullOrEmpty(sceneName) && scene.isLoaded && loadSceneMode == LoadSceneMode.Single) { - Debug.LogWarning($"【US】Single Scene => {sceneName} already exists!!!"); + Logging.PrintWarning($"【US】Single Scene => {sceneName} already exists!!!"); return null; } @@ -201,7 +202,7 @@ public async UniTask LoadFromBuildAsync(int buildIndex, LoadScen await UniTask.Yield(); } - Debug.Log($"Load Scene From Build => idx: {buildIndex}, mode: {loadSceneMode}"); + Logging.Print($"Load Scene From Build => idx: {buildIndex}, mode: {loadSceneMode}"); } return req; @@ -211,7 +212,7 @@ public void UnloadFromBuild(bool recursively, params string[] sceneNames) { if (sceneCount == 1) { - Debug.LogWarning("Cannot unload last scene!!!"); + Logging.PrintWarning("Cannot unload last scene!!!"); return; } @@ -226,7 +227,7 @@ public void UnloadFromBuild(bool recursively, params string[] sceneNames) if (sceneName == this.GetSceneAt(i).name) { SceneManager.UnloadSceneAsync(this.GetSceneAt(i)); - Debug.Log($"Unload Scene (Build) => sceneName: {sceneName}"); + Logging.Print($"Unload Scene (Build) => sceneName: {sceneName}"); } } } @@ -237,7 +238,7 @@ public void UnloadFromBuild(bool recursively, params string[] sceneNames) if (sceneName == this.GetSceneAt(i).name) { SceneManager.UnloadSceneAsync(this.GetSceneAt(i)); - Debug.Log($"Unload Scene (Build) => sceneName: {sceneName}"); + Logging.Print($"Unload Scene (Build) => sceneName: {sceneName}"); break; } } @@ -250,7 +251,7 @@ public void UnloadFromBuild(bool recursively, params int[] buildIndexes) { if (sceneCount == 1) { - Debug.LogWarning("Cannot unload last scene!!!"); + Logging.PrintWarning("Cannot unload last scene!!!"); return; } @@ -265,7 +266,7 @@ public void UnloadFromBuild(bool recursively, params int[] buildIndexes) if (buildIndex == this.GetSceneAt(i).buildIndex) { SceneManager.UnloadSceneAsync(this.GetSceneAt(i)); - Debug.Log($"Unload Scene (Build) => sceneName: {this.GetSceneAt(i).name}, buildIdx: {this.GetSceneAt(i).buildIndex}"); + Logging.Print($"Unload Scene (Build) => sceneName: {this.GetSceneAt(i).name}, buildIdx: {this.GetSceneAt(i).buildIndex}"); } } } @@ -279,7 +280,7 @@ public void UnloadFromBuild(bool recursively, params int[] buildIndexes) if (buildIndex == this.GetSceneAt(i).buildIndex) { SceneManager.UnloadSceneAsync(this.GetSceneAt(i)); - Debug.Log($"Unload Scene (Build) => sceneName: {this.GetSceneAt(i).name}, buildIdx: {this.GetSceneAt(i).buildIndex}"); + Logging.Print($"Unload Scene (Build) => sceneName: {this.GetSceneAt(i).name}, buildIdx: {this.GetSceneAt(i).buildIndex}"); break; } } diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Logger.cs b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Logger.cs new file mode 100644 index 00000000..997871ed --- /dev/null +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Logger.cs @@ -0,0 +1,7 @@ +using OxGKit.LoggingSystem; + +namespace OxGFrame.CoreFrame +{ + [LoggerName("OxGFrame.CoreFrame.Logger")] + public class Logger : Logging { } +} \ No newline at end of file diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Logger.cs.meta b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Logger.cs.meta new file mode 100644 index 00000000..7e41fc10 --- /dev/null +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/Logger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6a9877ad9a7224040ba4232f71d5ef49 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/OxGFrame.CoreFrame.Runtime.asmdef b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/OxGFrame.CoreFrame.Runtime.asmdef index 3cec52b2..8f789b33 100644 --- a/Assets/OxGFrame/CoreFrame/Scripts/Runtime/OxGFrame.CoreFrame.Runtime.asmdef +++ b/Assets/OxGFrame/CoreFrame/Scripts/Runtime/OxGFrame.CoreFrame.Runtime.asmdef @@ -4,7 +4,8 @@ "references": [ "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:48c9f6afdac61634db0e0f241c7d4d51", - "GUID:02b9a6f6b4dfd0b42b1b13bae3b89abf" + "GUID:02b9a6f6b4dfd0b42b1b13bae3b89abf", + "GUID:981f0bbbcbf62b74c9821862b0cd0202" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/OxGFrame/GSIFrame/Scripts/Runtime/GSIManagerBase.cs b/Assets/OxGFrame/GSIFrame/Scripts/Runtime/GSIManagerBase.cs index b7138525..4e441556 100644 --- a/Assets/OxGFrame/GSIFrame/Scripts/Runtime/GSIManagerBase.cs +++ b/Assets/OxGFrame/GSIFrame/Scripts/Runtime/GSIManagerBase.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using OxGKit.LoggingSystem; +using System.Collections.Generic; using UnityEngine; namespace OxGFrame.GSIFrame @@ -179,7 +180,7 @@ public void AddGameStage(int id, GSIBase gameStage) if (this._dictGameStage.ContainsKey(id)) { #if UNITY_EDITOR - Debug.Log($"Failed to add GameStage ({gameStage.GetType().Name}). Already has same GameStageId in cache"); + Logging.Print($"Failed to add GameStage ({gameStage.GetType().Name}). Already has same GameStageId in cache"); #endif return; } @@ -232,9 +233,9 @@ public void ChangeGameStage(int id) #if UNITY_EDITOR var gameStage = this.GetGameStage(id); if (this._incomingId == this._currentId) - Debug.Log(string.Format(" 【>>>>>> Same GameStage (Change Failed - Try Force) <<<<<<】Id: {0}, Stage: {1}", this._incomingId, gameStage?.GetType().Name)); + Logging.Print(string.Format(" 【>>>>>> Same GameStage (Change Failed - Try Force) <<<<<<】Id: {0}, Stage: {1}", this._incomingId, gameStage?.GetType().Name)); else - Debug.Log(string.Format(" 【>>>>>> Change GameStage <<<<<<】Id: {0}, Stage: {1}", this._incomingId, gameStage?.GetType().Name)); + Logging.Print(string.Format(" 【>>>>>> Change GameStage <<<<<<】Id: {0}, Stage: {1}", this._incomingId, gameStage?.GetType().Name)); #endif } @@ -258,7 +259,7 @@ public void ChangeGameStageForce(int id) { #if UNITY_EDITOR var gameStage = this.GetGameStage(id); - Debug.Log(string.Format(" 【>>>>>> Change GameStage Force <<<<<<】Id: {0}, Stage: {1}", id, gameStage?.GetType().Name)); + Logging.Print(string.Format(" 【>>>>>> Change GameStage Force <<<<<<】Id: {0}, Stage: {1}", id, gameStage?.GetType().Name)); #endif this.ReleaseGameStage(); // 立即釋放原本的 GameStage @@ -295,7 +296,7 @@ protected void InitGameStage() // 開始進行 GameStage 初始流程 if (this._currentGameStage != null) this._currentGameStage.BeginInit().Forget(); #if UNITY_EDITOR - else Debug.Log(string.Format("Cannot found GameStage. Id: {0}", this._currentId)); + else Logging.Print(string.Format("Cannot found GameStage. Id: {0}", this._currentId)); #endif } diff --git a/Assets/OxGFrame/GSIFrame/Scripts/Runtime/Logger.cs b/Assets/OxGFrame/GSIFrame/Scripts/Runtime/Logger.cs new file mode 100644 index 00000000..fd0ff212 --- /dev/null +++ b/Assets/OxGFrame/GSIFrame/Scripts/Runtime/Logger.cs @@ -0,0 +1,7 @@ +using OxGKit.LoggingSystem; + +namespace OxGFrame.GSIFrame +{ + [LoggerName("OxGFrame.GSIFrame.Logger")] + public class Logger : Logging { } +} \ No newline at end of file diff --git a/Assets/OxGFrame/GSIFrame/Scripts/Runtime/Logger.cs.meta b/Assets/OxGFrame/GSIFrame/Scripts/Runtime/Logger.cs.meta new file mode 100644 index 00000000..4e198cc4 --- /dev/null +++ b/Assets/OxGFrame/GSIFrame/Scripts/Runtime/Logger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e9eeec12b4f88fa47a8e1cfbbb8a67d0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/OxGFrame/GSIFrame/Scripts/Runtime/OxGFrame.GSIFrame.Runtime.asmdef b/Assets/OxGFrame/GSIFrame/Scripts/Runtime/OxGFrame.GSIFrame.Runtime.asmdef index e919446b..592d9d6a 100644 --- a/Assets/OxGFrame/GSIFrame/Scripts/Runtime/OxGFrame.GSIFrame.Runtime.asmdef +++ b/Assets/OxGFrame/GSIFrame/Scripts/Runtime/OxGFrame.GSIFrame.Runtime.asmdef @@ -2,7 +2,8 @@ "name": "OxGFrame.GSIFrame.Runtime", "rootNamespace": "", "references": [ - "GUID:f51ebe6a0ceec4240a699833d6309b23" + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:981f0bbbcbf62b74c9821862b0cd0202" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Hotfix/HotfixFsm/HotfixFsmStates.cs b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Hotfix/HotfixFsm/HotfixFsmStates.cs index 16d32310..62d89407 100644 --- a/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Hotfix/HotfixFsm/HotfixFsmStates.cs +++ b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Hotfix/HotfixFsm/HotfixFsmStates.cs @@ -8,6 +8,7 @@ using YooAsset; using OxGFrame.Hotfixer.HotfixEvent; using OxGFrame.AssetLoader; +using OxGKit.LoggingSystem; namespace OxGFrame.Hotfixer.HotfixFsm { @@ -31,7 +32,7 @@ void IStateNode.OnEnter() { HotfixEvents.HotfixFsmState.SendEventMessage(this); this._machine.ChangeState(); - Debug.Log("(Powered by HybridCLR) Hotfix Work"); + Logging.Print("(Powered by HybridCLR) Hotfix Work"); } void IStateNode.OnUpdate() @@ -325,7 +326,7 @@ private async UniTask _LoadAOTAssemblies() LoadImageErrorCode err = RuntimeApi.LoadMetadataForAOTAssembly(dll.bytes, mode); // Unload after load AssetLoaders.UnloadAsset(dllName); - Debug.Log($"Load AOT Assembly: {dllName}, mode: {mode}, ret: {err}"); + Logging.Print($"Load AOT Assembly: {dllName}, mode: {mode}, ret: {err}"); } } catch @@ -389,7 +390,7 @@ private async UniTask _LoadHotfixAssemblies() } HotfixManager.GetInstance().AddHotfixAssembly(dllName, hotfixAsm); - Debug.Log($"Load Hotfix Assembly: {dllName}"); + Logging.Print($"Load Hotfix Assembly: {dllName}"); } } catch diff --git a/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Hotfix/HotfixManager.cs b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Hotfix/HotfixManager.cs index 76907094..87e566a2 100644 --- a/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Hotfix/HotfixManager.cs +++ b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Hotfix/HotfixManager.cs @@ -1,5 +1,6 @@ using OxGFrame.Hotfixer.HotfixEvent; using OxGFrame.Hotfixer.HotfixFsm; +using OxGKit.LoggingSystem; using System.Collections.Generic; using System.Reflection; using UniFramework.Event; @@ -45,34 +46,34 @@ public HotfixManager() switch (msgData.stateNode) { case HotfixFsmStates.FsmHotfixPrepare: - Debug.Log(" >>>> HotfixFsmStates.FsmHotfixPrepare <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmHotfixPrepare <<<< "); break; case HotfixFsmStates.FsmInitHotfixPackage: - Debug.Log(" >>>> HotfixFsmStates.FsmInitHotfixPackage <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmInitHotfixPackage <<<< "); break; case HotfixFsmStates.FsmUpdateHotfixPackage: - Debug.Log(" >>>> HotfixFsmStates.FsmUpdateHotfixPackage <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmUpdateHotfixPackage <<<< "); break; case HotfixFsmStates.FsmHotfixCreateDownloader: - Debug.Log(" >>>> HotfixFsmStates.FsmHotfixCreateDownloader <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmHotfixCreateDownloader <<<< "); break; case HotfixFsmStates.FsmHotfixBeginDownload: - Debug.Log(" >>>> HotfixFsmStates.FsmHotfixBeginDownload <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmHotfixBeginDownload <<<< "); break; case HotfixFsmStates.FsmHotfixDownloadOver: - Debug.Log(" >>>> HotfixFsmStates.FsmHotfixDownloadOver <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmHotfixDownloadOver <<<< "); break; case HotfixFsmStates.FsmHotfixClearCache: - Debug.Log(" >>>> HotfixFsmStates.FsmHotfixClearCache <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmHotfixClearCache <<<< "); break; case HotfixFsmStates.FsmLoadAOTAssemblies: - Debug.Log(" >>>> HotfixFsmStates.FsmLoadAOTAssemblies <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmLoadAOTAssemblies <<<< "); break; case HotfixFsmStates.FsmLoadHotfixAssemblies: - Debug.Log(" >>>> HotfixFsmStates.FsmLoadHotfixAssemblies <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmLoadHotfixAssemblies <<<< "); break; case HotfixFsmStates.FsmHotfixDone: - Debug.Log(" >>>> HotfixFsmStates.FsmHotfixDone <<<< "); + Logging.Print(" >>>> HotfixFsmStates.FsmHotfixDone <<<< "); break; } }); @@ -144,7 +145,7 @@ public void CheckHotfix(string packageName, string[] aotAssemblies, string[] hot { if (this._isDone) { - Debug.Log("Hotfix all are loaded."); + Logging.Print("Hotfix all are loaded."); return; } @@ -175,7 +176,7 @@ public void CheckHotfix(string packageName, string[] aotAssemblies, string[] hot } else { - Debug.LogWarning("Hotfix Checking..."); + Logging.PrintWarning("Hotfix Checking..."); } } #endregion diff --git a/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Logger.cs b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Logger.cs new file mode 100644 index 00000000..6aed0391 --- /dev/null +++ b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Logger.cs @@ -0,0 +1,7 @@ +using OxGKit.LoggingSystem; + +namespace OxGFrame.Hotfixer +{ + [LoggerName("OxGFrame.Hotfixer.Logger")] + public class Logger : Logging { } +} \ No newline at end of file diff --git a/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Logger.cs.meta b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Logger.cs.meta new file mode 100644 index 00000000..43848ed8 --- /dev/null +++ b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/Logger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6b15deafc0a8ad04d852c1aac243ecf8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/OxGFrame/Hotfixer/Scripts/Runtime/OxGFrame.Hotfixer.Runtime.asmdef b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/OxGFrame.Hotfixer.Runtime.asmdef index 6854a2dc..858cd01f 100644 --- a/Assets/OxGFrame/Hotfixer/Scripts/Runtime/OxGFrame.Hotfixer.Runtime.asmdef +++ b/Assets/OxGFrame/Hotfixer/Scripts/Runtime/OxGFrame.Hotfixer.Runtime.asmdef @@ -7,7 +7,8 @@ "GUID:13ba8ce62aa80c74598530029cb2d649", "GUID:f22fac247a56d2d41b687bb0d900e54e", "GUID:c55575a9f1747c240822f4b7e0400716", - "GUID:02b9a6f6b4dfd0b42b1b13bae3b89abf" + "GUID:02b9a6f6b4dfd0b42b1b13bae3b89abf", + "GUID:981f0bbbcbf62b74c9821862b0cd0202" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioBase.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioBase.cs index 98f4ed6d..e082f0aa 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioBase.cs +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioBase.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using MyBox; +using OxGKit.LoggingSystem; using OxGKit.Utilities.Request; using UnityEngine; using UnityEngine.Audio; @@ -66,7 +67,7 @@ private async UniTask _InitAudio() if (this.audioClip == null) { - Debug.Log($"Cannot found AudioClip: {this.mediaName}"); + Logging.Print($"Cannot found AudioClip: {this.mediaName}"); return; } @@ -92,7 +93,7 @@ private async UniTask _InitAudio() this.isPrepared = true; - Debug.Log($"【Init Once】 Audio length: {this._mediaLength} (s)"); + Logging.Print($"【Init Once】 Audio length: {this._mediaLength} (s)"); } public async UniTask GetAudioFromStreamingAssets(bool cached) @@ -156,7 +157,7 @@ public override void Play(int loops, float volume) if (!this._audioSource.clip.preloadAudioData) { this._audioSource.clip.LoadAudioData(); - Debug.Log($"Load AudioName: {this.mediaName}, AudioSource => Time: {this._audioSource.time}, TimeSamples: {this._audioSource.timeSamples}; AudioClip => Time: {this._audioSource.clip.length}, Samples: {this._audioSource.clip.samples}, Freq: {this._audioSource.clip.frequency}"); + Logging.Print($"Load AudioName: {this.mediaName}, AudioSource => Time: {this._audioSource.time}, TimeSamples: {this._audioSource.timeSamples}; AudioClip => Time: {this._audioSource.clip.length}, Samples: {this._audioSource.clip.samples}, Freq: {this._audioSource.clip.frequency}"); } volume = (volume > 0f) ? volume : this._audioSource.volume; diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioManager.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioManager.cs index fca925e2..0e30eab6 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioManager.cs +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/AudioFrame/AudioManager.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using MyBox; +using OxGKit.LoggingSystem; using System; using System.Collections.Generic; using UnityEngine; @@ -161,7 +162,7 @@ public void SetMixerTransitionToSnapshot(AudioMixer mixer, AudioMixerSnapshot[] { log += $"{snapshots[i].name} : {weights[i]}; "; } - Debug.Log($"{log}"); + Logging.Print($"{log}"); } /// @@ -207,7 +208,7 @@ private void _Play(AudioBase audBase, int loops, float volume) this.LoadAndPlay(audBase, loops, volume); - Debug.Log(string.Format("Play Audio: {0}, Current Length: {1} (s)", audBase?.mediaName, audBase?.CurrentLength())); + Logging.Print(string.Format("Play Audio: {0}, Current Length: {1} (s)", audBase?.mediaName, audBase?.CurrentLength())); } /// @@ -293,7 +294,7 @@ private void _Stop(AudioBase audBase, bool disableEndEvent = false, bool forceDe this.ExitAndStop(audBase, false, disableEndEvent); - Debug.Log(string.Format("Stop Audio: {0}", audBase?.mediaName)); + Logging.Print(string.Format("Stop Audio: {0}", audBase?.mediaName)); // 確保音訊都設置完畢後才進行 Destroy, 避免異步處理尚未完成, 就被 Destroy 掉導致操作到已銷毀物件 if (audBase.isPrepared) @@ -356,7 +357,7 @@ private void _Pause(AudioBase audBase) this.ExitAndStop(audBase, true, false); - Debug.Log(string.Format("Pause Audio: {0}, Current Length: {1} (s)", audBase?.mediaName, audBase?.CurrentLength())); + Logging.Print(string.Format("Pause Audio: {0}, Current Length: {1} (s)", audBase?.mediaName, audBase?.CurrentLength())); } /// diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaBase.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaBase.cs index 26a075c1..078bc2a7 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaBase.cs +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaBase.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using MyBox; +using OxGKit.LoggingSystem; using OxGKit.Utilities.Request; using System; using System.Collections.Generic; @@ -222,12 +223,12 @@ public static string GetValueFromUrlCfg(string urlCfg, string key) var fileMap = new Dictionary(); foreach (var readLine in lines) { - Debug.Log($"readline: {readLine}"); + Logging.Print($"readline: {readLine}"); if (readLine.IndexOf('#') != -1 && readLine[0] == '#') continue; var args = readLine.Split(' '); if (args.Length >= 2) { - Debug.Log($"args => key: {args[0]}, value: {args[1]}"); + Logging.Print($"args => key: {args[0]}, value: {args[1]}"); if (!fileMap.ContainsKey(args[0])) fileMap.Add(args[0], args[1].Replace("\n", "").Replace("\r", "")); } } diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaManager.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaManager.cs index 3456905d..82f610e1 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaManager.cs +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/Implement/MediaManager.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using OxGFrame.AssetLoader; +using OxGKit.LoggingSystem; using System.Collections.Generic; using UnityEngine; @@ -273,11 +274,11 @@ protected virtual void Destroy(T mBase) // 卸載 AssetLoaders.UnloadAsset(assetName); - Debug.Log($"[MediaManager] Unload Asset: {assetName}"); + Logging.Print($"[MediaManager] Unload Asset: {assetName}"); } } - Debug.Log($"[MediaManager] Destroy Object: {assetName}, All Count: {this._listAllCache.Count}"); + Logging.Print($"[MediaManager] Destroy Object: {assetName}, All Count: {this._listAllCache.Count}"); } /// diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoBase.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoBase.cs index 76810184..798a2fa7 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoBase.cs +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoBase.cs @@ -1,5 +1,6 @@ using Cysharp.Threading.Tasks; using MyBox; +using OxGKit.LoggingSystem; using System; using System.Threading; using UnityEngine; @@ -72,7 +73,7 @@ private async UniTask _InitVideo() this._videoPlayer.clip = this.videoClip; if (this.videoClip == null) { - Debug.Log($"Cannot found VideoClip: {this.mediaName}"); + Logging.Print($"Cannot found VideoClip: {this.mediaName}"); return; } break; @@ -82,7 +83,7 @@ private async UniTask _InitVideo() string url = System.IO.Path.Combine(Application.streamingAssetsPath, this.fullPathName); if (!this.TrySetUrl(url)) { - Debug.Log($"Cannot found VideoClip: {this.mediaName}"); + Logging.Print($"Cannot found VideoClip: {this.mediaName}"); return; } } @@ -94,7 +95,7 @@ private async UniTask _InitVideo() string url = (!string.IsNullOrEmpty(urlSet)) ? $"{urlSet.Trim()}{this.urlSet.url.Trim()}" : this.urlSet.url.Trim(); if (!this.TrySetUrl(url)) { - Debug.Log($"Cannot found VideoClip: {this.mediaName}"); + Logging.Print($"Cannot found VideoClip: {this.mediaName}"); return; } } @@ -102,11 +103,11 @@ private async UniTask _InitVideo() } this._videoPlayer.Prepare(); - Debug.Log($"{this.mediaName} video is preparing..."); + Logging.Print($"{this.mediaName} video is preparing..."); var cts = new CancellationTokenSource(); cts.CancelAfterSlim(TimeSpan.FromSeconds(5f)); await UniTask.WaitUntil(() => { return this._videoPlayer.isPrepared; }, PlayerLoopTiming.FixedUpdate, cts.Token); - Debug.Log($"{this.mediaName} video is prepared"); + Logging.Print($"{this.mediaName} video is prepared"); this._videoPlayer.SetDirectAudioMute(0, true); this._videoPlayer.playOnAwake = false; @@ -129,7 +130,7 @@ private async UniTask _InitVideo() this.isPrepared = true; - Debug.Log($"【Init Once】 Video length: {this._mediaLength} (s)"); + Logging.Print($"【Init Once】 Video length: {this._mediaLength} (s)"); } /// diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoManager.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoManager.cs index 349f2fea..6a034543 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoManager.cs +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Core/VideoFrame/VideoManager.cs @@ -1,4 +1,5 @@ using Cysharp.Threading.Tasks; +using OxGKit.LoggingSystem; using UnityEngine; namespace OxGFrame.MediaFrame.VideoFrame @@ -53,7 +54,7 @@ private void _Play(VideoBase vidBase, int loops, float volume) this.LoadAndPlay(vidBase, loops, volume); - Debug.Log(string.Format("Play Video: {0}", vidBase?.mediaName)); + Logging.Print(string.Format("Play Video: {0}", vidBase?.mediaName)); } /// @@ -74,7 +75,7 @@ public override async UniTask Play(string packageName, string asset VideoBase main = vidBases[0]; if (main.IsPlaying()) { - Debug.LogWarning(string.Format("【Video】{0} already played!!!", assetName)); + Logging.PrintWarning(string.Format("【Video】{0} already played!!!", assetName)); return vidBases; } @@ -89,7 +90,7 @@ public override async UniTask Play(string packageName, string asset VideoBase vidBase = await this.CloneAsset(assetName, go, parent, spawnParent); if (vidBase == null) { - Debug.LogWarning(string.Format("Asset not found at this path!!!【Video】: {0}", assetName)); + Logging.PrintWarning(string.Format("Asset not found at this path!!!【Video】: {0}", assetName)); return new VideoBase[] { }; } @@ -135,7 +136,7 @@ private void _Stop(VideoBase vidBase, bool disableEndEvent = false, bool forceDe this.ExitAndStop(vidBase, false, disableEndEvent); - Debug.Log(string.Format("Stop Video: {0}", vidBase?.mediaName)); + Logging.Print(string.Format("Stop Video: {0}", vidBase?.mediaName)); // 確保音訊都設置完畢後才進行 Destroy, 避免異步處理尚未完成, 就被 Destroy 掉導致操作到已銷毀物件 if (vidBase.isPrepared) @@ -198,7 +199,7 @@ private void _Pause(VideoBase vidBase) this.ExitAndStop(vidBase, true, false); - Debug.Log(string.Format("Pause Video: {0}, Current Length: {1} (s)", vidBase?.mediaName, vidBase?.CurrentLength())); + Logging.Print(string.Format("Pause Video: {0}, Current Length: {1} (s)", vidBase?.mediaName, vidBase?.CurrentLength())); } /// diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Logger.cs b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Logger.cs new file mode 100644 index 00000000..2ff096e2 --- /dev/null +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Logger.cs @@ -0,0 +1,7 @@ +using OxGKit.LoggingSystem; + +namespace OxGFrame.MediaFrame +{ + [LoggerName("OxGFrame.MediaFrame.Logger")] + public class Logger : Logging { } +} \ No newline at end of file diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Logger.cs.meta b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Logger.cs.meta new file mode 100644 index 00000000..fb55e7e7 --- /dev/null +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/Logger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2d5440f521faffc4f92dc5e78af1100b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/OxGFrame.MediaFrame.Runtime.asmdef b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/OxGFrame.MediaFrame.Runtime.asmdef index e61cc342..69f8231a 100644 --- a/Assets/OxGFrame/MediaFrame/Scripts/Runtime/OxGFrame.MediaFrame.Runtime.asmdef +++ b/Assets/OxGFrame/MediaFrame/Scripts/Runtime/OxGFrame.MediaFrame.Runtime.asmdef @@ -6,7 +6,8 @@ "GUID:48c9f6afdac61634db0e0f241c7d4d51", "GUID:e34a5702dd353724aa315fb8011f08c3", "GUID:02b9a6f6b4dfd0b42b1b13bae3b89abf", - "GUID:f3b8d4b152174ca47b578c325544e581" + "GUID:f3b8d4b152174ca47b578c325544e581", + "GUID:981f0bbbcbf62b74c9821862b0cd0202" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Concrete/NetNode.cs b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Concrete/NetNode.cs index 41d42bb2..60214a87 100644 --- a/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Concrete/NetNode.cs +++ b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Concrete/NetNode.cs @@ -1,6 +1,7 @@ using System; using UnityEngine; using OxGKit.Utilities.Timer; +using OxGKit.LoggingSystem; namespace OxGFrame.NetFrame { @@ -294,7 +295,7 @@ private void _ProcessOutReceive() { this._outReceiveAction?.Invoke(); - Debug.Log("NetNode timeout processing..."); + Logging.Print("NetNode timeout processing..."); } } #endregion @@ -326,7 +327,7 @@ private void _ProcessHeartBeat() { this._heartBeatAction?.Invoke(); - Debug.Log("NetNode check heartbeat..."); + Logging.Print("NetNode check heartbeat..."); } } #endregion @@ -379,7 +380,7 @@ private void _ProcessAutoReconnect() this._reconnectAction?.Invoke(); - Debug.Log("NetNode try to reconnecting..."); + Logging.Print("NetNode try to reconnecting..."); } } else diff --git a/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Implement/TcpSock.cs b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Implement/TcpSock.cs index c2d0be8b..5ab476ff 100644 --- a/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Implement/TcpSock.cs +++ b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Implement/TcpSock.cs @@ -3,6 +3,7 @@ using System.Net.Sockets; using UnityEngine; using System.Threading; +using OxGKit.LoggingSystem; namespace OxGFrame.NetFrame { @@ -40,8 +41,7 @@ public void CreateConnect(NetOption netOption) try { - Debug.Log(netOption.host); - Debug.Log(netOption.port); + Logging.Print($"{netOption.host}:{netOption.port}"); IPAddress ipa = IPAddress.Parse(netOption.host); IAsyncResult iAsyncResult = this._tcp.BeginConnect(ipa, netOption.port, this._ConnectedAction, null); iAsyncResult.AsyncWaitHandle.WaitOne(CONNECTING_TIMEOUT_MSEC); @@ -51,7 +51,7 @@ public void CreateConnect(NetOption netOption) if (this._tcp != null) this._tcp.Close(); this.OnClose(this, 0); - Debug.Log("!iAsyncResult.IsCompleted"); + Logging.Print("!iAsyncResult.IsCompleted"); } } catch (Exception ex) @@ -59,7 +59,7 @@ public void CreateConnect(NetOption netOption) this._tcp.Close(); this.OnError(this, string.Format("{0}", ex)); - Debug.Log("CreateConnect Failed" + ex.Message); + Logging.Print("CreateConnect Failed" + ex.Message); } } @@ -74,7 +74,7 @@ private void _ConnectedAction(IAsyncResult ar) } catch (Exception ex) { - Debug.LogError("End Connect Failed" + ex.Message); + Logging.PrintError("End Connect Failed" + ex.Message); Interlocked.Increment(ref this._failedConnectionCount); @@ -105,12 +105,12 @@ private void _ReadAction(IAsyncResult ar) try { readBytes = ns.EndRead(ar); - Debug.Log(string.Format("Reading Ends: Time {0}, ReadSize: {1} bytes", DateTime.Now, readBytes)); + Logging.Print(string.Format("Reading Ends: Time {0}, ReadSize: {1} bytes", DateTime.Now, readBytes)); } catch (Exception ex) { this.Close(); - Debug.LogError(string.Format("EndRead Error {0}, The Connection Has Been Closed. {1}, bytes: {2}", ex.Message, ar, readBytes)); + Logging.PrintError(string.Format("EndRead Error {0}, The Connection Has Been Closed. {1}, bytes: {2}", ex.Message, ar, readBytes)); this.OnError(this, string.Format("{0}", ex)); return; @@ -129,7 +129,7 @@ private void _ReadAction(IAsyncResult ar) } catch (Exception ex) { - Debug.LogError(ex.Message); + Logging.PrintError(ex.Message); } } else @@ -151,7 +151,7 @@ private void _ReadAction(IAsyncResult ar) } catch (Exception ex) { - Debug.LogError(ex.Message); + Logging.PrintError(ex.Message); } } @@ -164,7 +164,7 @@ private void _WriteAction(IAsyncResult ar) ns.EndWrite(ar); - Debug.Log(string.Format("Sending Buffer Ends: Time {0}", DateTime.Now)); + Logging.Print(string.Format("Sending Buffer Ends: Time {0}", DateTime.Now)); } public bool Send(byte[] buffer) @@ -175,12 +175,12 @@ public bool Send(byte[] buffer) { NetworkStream ns = this._tcp.GetStream(); ns.BeginWrite(buffer, 0, buffer.Length, new AsyncCallback(this._WriteAction), ns); - Debug.Log(string.Format("TcpSock - SentSize: {0} bytes", buffer.Length)); + Logging.Print(string.Format("TcpSock - SentSize: {0} bytes", buffer.Length)); return true; } catch (Exception ex) { - Debug.LogError(string.Format("Send Error {0}", ex.Message)); + Logging.PrintError(string.Format("Send Error {0}", ex.Message)); this.Close(); return false; } diff --git a/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Implement/WebSock.cs b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Implement/WebSock.cs index 72ce99cf..768ecc84 100644 --- a/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Implement/WebSock.cs +++ b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Core/Implement/WebSock.cs @@ -1,4 +1,5 @@ -using System; +using OxGKit.LoggingSystem; +using System; using UnityEngine; using UnityWebSocket; @@ -19,7 +20,7 @@ public void CreateConnect(NetOption netOption) this._netOption = netOption; if (string.IsNullOrEmpty(netOption.url)) { - Debug.Log("ERROR: Websocket Connect failed, net option URL cannot be null."); + Logging.Print("ERROR: Websocket Connect failed, net option URL cannot be null."); return; } @@ -44,7 +45,7 @@ public void CreateConnect(NetOption netOption) this._ws.ConnectAsync(); - Debug.Log(string.Format("URL: {0} => Websocket is Connected.", this._netOption.url)); + Logging.Print(string.Format("URL: {0} => Websocket is Connected.", this._netOption.url)); } public bool IsConnected() @@ -60,7 +61,7 @@ public bool Send(byte[] buffer) if (this.IsConnected()) { this._ws.SendAsync(buffer); - Debug.Log(string.Format("Websocket - SentSize: {0} bytes", buffer.Length)); + Logging.Print(string.Format("Websocket - SentSize: {0} bytes", buffer.Length)); return true; } diff --git a/Assets/OxGFrame/NetFrame/Scripts/Runtime/Logger.cs b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Logger.cs new file mode 100644 index 00000000..d8514723 --- /dev/null +++ b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Logger.cs @@ -0,0 +1,7 @@ +using OxGKit.LoggingSystem; + +namespace OxGFrame.NetFrame +{ + [LoggerName("OxGFrame.NetFrame.Logger")] + public class Logger : Logging { } +} \ No newline at end of file diff --git a/Assets/OxGFrame/NetFrame/Scripts/Runtime/Logger.cs.meta b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Logger.cs.meta new file mode 100644 index 00000000..de610a6a --- /dev/null +++ b/Assets/OxGFrame/NetFrame/Scripts/Runtime/Logger.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 91bd46a39d2531a4884e1130459a413b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/OxGFrame/NetFrame/Scripts/Runtime/OxGFrame.NetFrame.Runtime.asmdef b/Assets/OxGFrame/NetFrame/Scripts/Runtime/OxGFrame.NetFrame.Runtime.asmdef index 9a752c3c..fe6a0f90 100644 --- a/Assets/OxGFrame/NetFrame/Scripts/Runtime/OxGFrame.NetFrame.Runtime.asmdef +++ b/Assets/OxGFrame/NetFrame/Scripts/Runtime/OxGFrame.NetFrame.Runtime.asmdef @@ -4,7 +4,8 @@ "references": [ "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:8b65d8710c3b04373a41cbf6b777ee65", - "GUID:f3b8d4b152174ca47b578c325544e581" + "GUID:f3b8d4b152174ca47b578c325544e581", + "GUID:981f0bbbcbf62b74c9821862b0cd0202" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/OxGFrame/Samples~/AudioFrameDemo/AudioFrameDemo.unity b/Assets/OxGFrame/Samples~/AudioFrameDemo/AudioFrameDemo.unity index 720bf65c..4b7d826b 100644 --- a/Assets/OxGFrame/Samples~/AudioFrameDemo/AudioFrameDemo.unity +++ b/Assets/OxGFrame/Samples~/AudioFrameDemo/AudioFrameDemo.unity @@ -9954,6 +9954,75 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 795.3, y: 60} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1001 &1840517528 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &1844509265 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/Samples~/BundleDemo/BundleDemo.unity b/Assets/OxGFrame/Samples~/BundleDemo/BundleDemo.unity index 9ac2f762..f172ac6e 100644 --- a/Assets/OxGFrame/Samples~/BundleDemo/BundleDemo.unity +++ b/Assets/OxGFrame/Samples~/BundleDemo/BundleDemo.unity @@ -999,6 +999,75 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 295920460} m_CullTransparentMesh: 1 +--- !u!1001 &311374305 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &358014991 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/Samples~/CPFrameDemo/CPFrameDemo.unity b/Assets/OxGFrame/Samples~/CPFrameDemo/CPFrameDemo.unity index 88350f04..a22a8429 100644 --- a/Assets/OxGFrame/Samples~/CPFrameDemo/CPFrameDemo.unity +++ b/Assets/OxGFrame/Samples~/CPFrameDemo/CPFrameDemo.unity @@ -337,6 +337,75 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 451014373} m_CullTransparentMesh: 1 +--- !u!1001 &964898734 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &1005025566 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/Samples~/EventCenterDemo/EventCenterDemo.unity b/Assets/OxGFrame/Samples~/EventCenterDemo/EventCenterDemo.unity index c58f8a17..5520672a 100644 --- a/Assets/OxGFrame/Samples~/EventCenterDemo/EventCenterDemo.unity +++ b/Assets/OxGFrame/Samples~/EventCenterDemo/EventCenterDemo.unity @@ -553,6 +553,75 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 672047408} m_CullTransparentMesh: 1 +--- !u!1001 &1152661778 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &1451796667 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/Samples~/GSIFrameDemo/GSIFrameDemo.unity b/Assets/OxGFrame/Samples~/GSIFrameDemo/GSIFrameDemo.unity index da4565f1..4d3fa91e 100644 --- a/Assets/OxGFrame/Samples~/GSIFrameDemo/GSIFrameDemo.unity +++ b/Assets/OxGFrame/Samples~/GSIFrameDemo/GSIFrameDemo.unity @@ -442,6 +442,75 @@ MonoBehaviour: m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 m_CursorLockBehavior: 0 +--- !u!1001 &2032094679 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &2062527277 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/Samples~/HotfixerDemo/Scenes/Main/HotfixerDemo.unity b/Assets/OxGFrame/Samples~/HotfixerDemo/Scenes/Main/HotfixerDemo.unity index d895ba8c..0aefb2c9 100644 --- a/Assets/OxGFrame/Samples~/HotfixerDemo/Scenes/Main/HotfixerDemo.unity +++ b/Assets/OxGFrame/Samples~/HotfixerDemo/Scenes/Main/HotfixerDemo.unity @@ -123,6 +123,75 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} +--- !u!1001 &197656118 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &696595742 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/Samples~/SRFrameDemo/SRFrameDemo.unity b/Assets/OxGFrame/Samples~/SRFrameDemo/SRFrameDemo.unity index 1ca07728..b1b3ed7a 100644 --- a/Assets/OxGFrame/Samples~/SRFrameDemo/SRFrameDemo.unity +++ b/Assets/OxGFrame/Samples~/SRFrameDemo/SRFrameDemo.unity @@ -2822,6 +2822,75 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1165033622} m_CullTransparentMesh: 0 +--- !u!1001 &1218744336 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &1312587520 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/Samples~/UIFrameDemo/UIFrameDemo.unity b/Assets/OxGFrame/Samples~/UIFrameDemo/UIFrameDemo.unity index b7562a4e..a7eb7115 100644 --- a/Assets/OxGFrame/Samples~/UIFrameDemo/UIFrameDemo.unity +++ b/Assets/OxGFrame/Samples~/UIFrameDemo/UIFrameDemo.unity @@ -934,6 +934,80 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1001 &1648868616 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365937, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: loggerSetting + value: + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &1654953172 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/Samples~/USFrameDemo/USFrameDemo.unity b/Assets/OxGFrame/Samples~/USFrameDemo/USFrameDemo.unity index b44b2771..c9c114f6 100644 --- a/Assets/OxGFrame/Samples~/USFrameDemo/USFrameDemo.unity +++ b/Assets/OxGFrame/Samples~/USFrameDemo/USFrameDemo.unity @@ -439,6 +439,75 @@ MonoBehaviour: m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 m_CursorLockBehavior: 0 +--- !u!1001 &1299908767 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &1432751639 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/Samples~/VideoFrameDemo/VideoFrameDemo.unity b/Assets/OxGFrame/Samples~/VideoFrameDemo/VideoFrameDemo.unity index 6a29a548..28548a8a 100644 --- a/Assets/OxGFrame/Samples~/VideoFrameDemo/VideoFrameDemo.unity +++ b/Assets/OxGFrame/Samples~/VideoFrameDemo/VideoFrameDemo.unity @@ -639,6 +639,80 @@ Transform: m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &409898681 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 3415422755630365936, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_Name + value: LoggingLauncher + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365937, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: loggerSetting + value: + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3415422755630365950, guid: 39c1e8f8b6463b041be46441ad8ef6b1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 39c1e8f8b6463b041be46441ad8ef6b1, type: 3} --- !u!1 &598567114 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/OxGFrame/package.json b/Assets/OxGFrame/package.json index 9df5b715..faf6b92f 100644 --- a/Assets/OxGFrame/package.json +++ b/Assets/OxGFrame/package.json @@ -2,7 +2,7 @@ "name": "com.michaelo.oxgframe", "displayName": "OxGFrame", "description": "The OxGFrame is a framework based on Unity for accelerating game development. Supports multi-platform Win, OSX, Android, iOS, WebGL.", - "version": "2.7.6", + "version": "2.7.7", "unity": "2021.3", "license": "MIT", "samples": [ diff --git a/Assets/Samples.meta b/Assets/Samples.meta new file mode 100644 index 00000000..6ecd9ab6 --- /dev/null +++ b/Assets/Samples.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 63f2d9a5f614ea34b960999dd9ed531c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/OxGKit.LoggingSystem.meta b/Assets/Samples/OxGKit.LoggingSystem.meta new file mode 100644 index 00000000..e9986c38 --- /dev/null +++ b/Assets/Samples/OxGKit.LoggingSystem.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 606666ec4101da24f804094e4a0ed4e9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview.meta b/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview.meta new file mode 100644 index 00000000..57c1c0b9 --- /dev/null +++ b/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 34ff9487b8eee7e4bb90e9cb57995c63 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview/LoggingLauncher Prefab.meta b/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview/LoggingLauncher Prefab.meta new file mode 100644 index 00000000..1557695b --- /dev/null +++ b/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview/LoggingLauncher Prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7dc89d22e6fcac64e9512e2f211f98b6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview/LoggingLauncher Prefab/LoggingLauncher.prefab b/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview/LoggingLauncher Prefab/LoggingLauncher.prefab new file mode 100644 index 00000000..bebb9201 --- /dev/null +++ b/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview/LoggingLauncher Prefab/LoggingLauncher.prefab @@ -0,0 +1,47 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3415422755630365936 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3415422755630365950} + - component: {fileID: 3415422755630365937} + m_Layer: 0 + m_Name: LoggingLauncher + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3415422755630365950 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3415422755630365936} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &3415422755630365937 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3415422755630365936} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac78a850a62cbc04daa134c143826757, type: 3} + m_Name: + m_EditorClassIdentifier: + loggerSetting: {fileID: 0} diff --git a/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview/LoggingLauncher Prefab/LoggingLauncher.prefab.meta b/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview/LoggingLauncher Prefab/LoggingLauncher.prefab.meta new file mode 100644 index 00000000..d7aa968a --- /dev/null +++ b/Assets/Samples/OxGKit.LoggingSystem/0.0.1-preview/LoggingLauncher Prefab/LoggingLauncher.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 39c1e8f8b6463b041be46441ad8ef6b1 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index 989f9429..56040bbc 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -3,6 +3,7 @@ "com.code-philosophy.hybridclr": "https://github.com/focus-creative-games/hybridclr_unity.git", "com.domybest.lwmybox": "https://github.com/michael811125/LWMyBox.git", "com.jeffjadulco.guidregenerator": "https://github.com/jeffjadulco/unity-guid-regenerator.git", + "com.michaelo.oxgkit.loggingsystem": "https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts", "com.michaelo.oxgkit.utilities": "https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/Utilities/Scripts", "com.unity.2d.animation": "7.0.10", "com.unity.2d.pixel-perfect": "5.0.3", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index c0208462..5d1455df 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -23,12 +23,19 @@ "dependencies": {}, "hash": "7dbce4b94bd7f92c33de382439f662a0731a1db9" }, + "com.michaelo.oxgkit.loggingsystem": { + "version": "https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts", + "depth": 0, + "source": "git", + "dependencies": {}, + "hash": "16c81642939153a6b3fe374f902eac04ca3eea07" + }, "com.michaelo.oxgkit.utilities": { "version": "https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/Utilities/Scripts", "depth": 0, "source": "git", "dependencies": {}, - "hash": "2e53d6bc5255f20d3cf2b95ef0b153540156dd12" + "hash": "16c81642939153a6b3fe374f902eac04ca3eea07" }, "com.unity.2d.animation": { "version": "7.0.10", diff --git a/README.md b/README.md index b5316c05..d965c849 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,11 @@ ## 安裝 OxGFrame with YooAsset + HybridCLR +各模組的日誌打印可以自由控制開關,皆依賴 [OxGKit.LoggingSystem](https://github.com/michael811125/OxGKit),安裝後需要 Import LoggingLauncher from Samples,再拖曳至場景上並且加載 LoggerSetting 才能成功激活日誌系統的配置。 + | **需先手動安裝依賴庫 (Recommended to manually install dependencies first)** | |:-| +| [OxGKit.LoggingSystem v0.0.1-preview or higher](https://github.com/michael811125/OxGKit), Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/LoggingSystem/Scripts to Package Manager | | [OxGKit.Utilities v0.0.4-preview or higher](https://github.com/michael811125/OxGKit), Add https://github.com/michael811125/OxGKit.git?path=Assets/OxGKit/Utilities/Scripts to Package Manager | | [LWMyBox v1.1.3 or higher](https://github.com/michael811125/LWMyBox), Add https://github.com/michael811125/LWMyBox.git to Package Manager **(建議改成輕量版的 MyBox 改進編譯效率)** | | [HybirdCLR v3.4.2 or higher](https://github.com/focus-creative-games/hybridclr), Add https://github.com/focus-creative-games/hybridclr_unity.git to Package Manager (革命性的程式熱更新方案) **特別推薦** | @@ -194,7 +197,7 @@ OxGFrame 是基於 Unity 用於加快遊戲開發的框架,並且使用 UniTas - 支援特定版本 DLC package 的下載與 DLC package 卸載功能,需手動進行 AssetPatcher.InitDlcPackage,並且指定特定 dlcVersion,對於 dlcVersion 也可以單一固定 dlcVersion,變成只要 DLC 有更新就可以使用固定路徑進行更新。 **App Package** -``` +```C# // [Load asset and download from specific package (Export App Bundles for CDN)] var packageName = "OtherPackage"; @@ -209,7 +212,7 @@ if (isInitialized) ``` **DLC Package** -``` +```C# // [Load asset and download from specific package (Export Individual DLC Bundles for CDN)] var packageName = "DlcPackage"; @@ -413,7 +416,7 @@ video_urlset 127.0.0.1/video/ #### Default API -``` +```C# public static int GetCurrentId() public static U GetStage() where U : GSIBase @@ -465,7 +468,7 @@ video_urlset 127.0.0.1/video/ #### Default API -``` +```C# public static void Add() where UClass : TClass, new() public static void Add(int id) where UClass : TClass, new() @@ -476,6 +479,8 @@ video_urlset 127.0.0.1/video/ public static void Delete(int id) + public static void DeleteAll() + public static UClass Find() where UClass : TClass public static UClass Find(int id) where UClass : TClass