From b93b993951da9f2b7d1ff4946eaf58f3128568fa Mon Sep 17 00:00:00 2001 From: hevinci Date: Thu, 20 Jul 2023 14:28:22 +0800 Subject: [PATCH] update package system --- .../Runtime/PackageSystem/ResourcePackage.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Assets/YooAsset/Runtime/PackageSystem/ResourcePackage.cs b/Assets/YooAsset/Runtime/PackageSystem/ResourcePackage.cs index e4ec38a..d2a8e65 100644 --- a/Assets/YooAsset/Runtime/PackageSystem/ResourcePackage.cs +++ b/Assets/YooAsset/Runtime/PackageSystem/ResourcePackage.cs @@ -205,11 +205,19 @@ namespace YooAsset else throw new NotImplementedException(); - // 检测运行平台 - if (_playMode == EPlayMode.HostPlayMode || _playMode == EPlayMode.OfflinePlayMode) + // 检测运行时平台 + if (_playMode != EPlayMode.EditorSimulateMode) { #if UNITY_WEBGL - throw new Exception($"WebGL plateform not support : {_playMode} ! Please use {nameof(EPlayMode.WebPlayMode)}"); + if (_playMode != EPlayMode.WebPlayMode) + { + throw new Exception($"{_playMode} can not support WebGL plateform ! Please use {nameof(EPlayMode.WebPlayMode)}"); + } +#else + if (_playMode == EPlayMode.WebPlayMode) + { + throw new Exception($"{nameof(EPlayMode.WebPlayMode)} only support WebGL plateform !"); + } #endif }