refactor : 重构代码

This commit is contained in:
何冠峰
2026-01-17 18:44:48 +08:00
parent e10888de93
commit 0a1c81faf1
75 changed files with 219 additions and 197 deletions
@@ -39,7 +39,7 @@ namespace YooAsset
if (_assetBundle == null)
{
_steps = ESteps.Done;
Error = $"The bundle {_packageBundle.BundleName} has been destroyed due to unity engine bugs !";
Error = $"The bundle {_packageBundle.BundleName} has been destroyed due to unity engine bugs.";
Status = EOperationStatus.Failed;
return;
}
@@ -39,7 +39,7 @@ namespace YooAsset
if (_assetBundle == null)
{
_steps = ESteps.Done;
Error = $"The bundle {_packageBundle.BundleName} has been destroyed due to unity engine bugs !";
Error = $"The bundle {_packageBundle.BundleName} has been destroyed due to unity engine bugs.";
Status = EOperationStatus.Failed;
return;
}
@@ -72,7 +72,7 @@ namespace YooAsset
if (IsWaitForAsyncComplete)
{
//注意:场景加载无法强制异步转同步
YooLogger.Error("The scene is loading asyn !");
YooLogger.Error("The scene is loading asyn.");
}
else
{
@@ -39,7 +39,7 @@ namespace YooAsset
if (_assetBundle == null)
{
_steps = ESteps.Done;
Error = $"The bundle {_packageBundle.BundleName} has been destroyed due to unity engine bugs !";
Error = $"The bundle {_packageBundle.BundleName} has been destroyed due to unity engine bugs.";
Status = EOperationStatus.Failed;
return;
}
@@ -5,7 +5,7 @@ namespace YooAsset
{
internal override void InternalStart()
{
Error = $"{nameof(RawBundleLoadAllAssetsOperation)} not support load all assets !";
Error = $"{nameof(RawBundleLoadAllAssetsOperation)} not support load all assets.";
Status = EOperationStatus.Failed;
}
internal override void InternalUpdate()
@@ -5,7 +5,7 @@ namespace YooAsset
{
internal override void InternalStart()
{
Error = $"{nameof(RawBundleLoadAssetOperation)} not support load asset !";
Error = $"{nameof(RawBundleLoadAssetOperation)} not support load asset.";
Status = EOperationStatus.Failed;
}
internal override void InternalUpdate()
@@ -5,7 +5,7 @@ namespace YooAsset
{
internal override void InternalStart()
{
Error = $"{nameof(RawBundleLoadSceneOperation)} not support load scene !";
Error = $"{nameof(RawBundleLoadSceneOperation)} not support load scene.";
Status = EOperationStatus.Failed;
}
internal override void InternalUpdate()
@@ -5,7 +5,7 @@ namespace YooAsset
{
internal override void InternalStart()
{
Error = $"{nameof(RawBundleLoadSubAssetsOperation)} not support load sub assets !";
Error = $"{nameof(RawBundleLoadSubAssetsOperation)} not support load sub assets.";
Status = EOperationStatus.Failed;
}
internal override void InternalUpdate()
@@ -28,7 +28,7 @@ namespace YooAsset
_steps = ESteps.CheckBundle;
#else
_steps = ESteps.Done;
Error = $"{nameof(VirtualBundleLoadAllAssetsOperation)} only support unity editor platform !";
Error = $"{nameof(VirtualBundleLoadAllAssetsOperation)} only support unity editor platform.";
Status = EOperationStatus.Failed;
#endif
}
@@ -27,7 +27,7 @@ namespace YooAsset
_steps = ESteps.CheckBundle;
#else
_steps = ESteps.Done;
Error = $"{nameof(VirtualBundleLoadAssetOperation)} only support unity editor platform !";
Error = $"{nameof(VirtualBundleLoadAssetOperation)} only support unity editor platform.";
Status = EOperationStatus.Failed;
#endif
}
@@ -31,7 +31,7 @@ namespace YooAsset
_steps = ESteps.LoadScene;
#else
_steps = ESteps.Done;
Error = $"{nameof(VirtualBundleLoadSceneOperation)} only support unity editor platform !";
Error = $"{nameof(VirtualBundleLoadSceneOperation)} only support unity editor platform.";
Status = EOperationStatus.Failed;
#endif
}
@@ -77,7 +77,7 @@ namespace YooAsset
if (IsWaitForAsyncComplete)
{
// 注意:场景加载无法强制异步转同步
YooLogger.Error("The scene is loading asyn !");
YooLogger.Error("The scene is loading asyn.");
}
else
{
@@ -28,7 +28,7 @@ namespace YooAsset
_steps = ESteps.CheckBundle;
#else
_steps = ESteps.Done;
Error = $"{nameof(VirtualBundleLoadSubAssetsOperation)} only support unity editor platform !";
Error = $"{nameof(VirtualBundleLoadSubAssetsOperation)} only support unity editor platform.";
Status = EOperationStatus.Failed;
#endif
}