update package system

mlyDevMerge1.5.7
hevinci 2023-07-20 14:28:22 +08:00 committed by QiJing
parent 421dd7458d
commit a2e3164eab
1 changed files with 11 additions and 3 deletions

View File

@ -205,11 +205,19 @@ namespace YooAsset
else else
throw new NotImplementedException(); throw new NotImplementedException();
// 检测运行平台 // 检测运行平台
if (_playMode == EPlayMode.HostPlayMode || _playMode == EPlayMode.OfflinePlayMode) if (_playMode != EPlayMode.EditorSimulateMode)
{ {
#if UNITY_WEBGL #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 #endif
} }