From 688f8ec26cb2b45826ebb3a5c46714205e6dfbc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Mon, 2 Sep 2024 11:29:01 +0800 Subject: [PATCH] feat : webgl platform logs --- .../Operation/DBFSInitializeOperation.cs | 6 ++++++ .../Operation/DCFSInitializeOperation.cs | 6 ++++++ Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs | 2 ++ 3 files changed, 14 insertions(+) diff --git a/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/Operation/DBFSInitializeOperation.cs b/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/Operation/DBFSInitializeOperation.cs index 1ad7326..3369fdd 100644 --- a/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/Operation/DBFSInitializeOperation.cs +++ b/Assets/YooAsset/Runtime/FileSystem/DefaultBuildinFileSystem/Operation/DBFSInitializeOperation.cs @@ -24,7 +24,13 @@ namespace YooAsset } internal override void InternalOnStart() { +#if UNITY_WEBGL + _steps = ESteps.Done; + Status = EOperationStatus.Failed; + Error = $"{nameof(DefaultBuildinFileSystem)} is not support WEBGL platform !"; +#else _steps = ESteps.InitUnpackFileSystem; +#endif } internal override void InternalOnUpdate() { diff --git a/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/DCFSInitializeOperation.cs b/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/DCFSInitializeOperation.cs index d27fb38..07aed4d 100644 --- a/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/DCFSInitializeOperation.cs +++ b/Assets/YooAsset/Runtime/FileSystem/DefaultCacheFileSystem/Operation/DCFSInitializeOperation.cs @@ -24,7 +24,13 @@ namespace YooAsset } internal override void InternalOnStart() { +#if UNITY_WEBGL + _steps = ESteps.Done; + Status = EOperationStatus.Failed; + Error = $"{nameof(DefaultCacheFileSystem)} is not support WEBGL platform !"; +#else _steps = ESteps.CheckAppFootPrint; +#endif } internal override void InternalOnUpdate() { diff --git a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs index db315dc..31977fd 100644 --- a/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs +++ b/Assets/YooAsset/Runtime/ResourcePackage/ResourcePackage.cs @@ -181,6 +181,8 @@ namespace YooAsset { _initializeStatus = op.Status; _initializeError = op.Error; + if (_initializeStatus != EOperationStatus.Succeed) + YooLogger.Error(_initializeError); } ///