Optimized the speed of simulate build.
优化了编辑器下模拟构建的速度。
This commit is contained in:
+7
-7
@@ -3,19 +3,19 @@ using System.Reflection;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal static class EditorPlayModeHelper
|
||||
internal static class EditorSimulateModeHelper
|
||||
{
|
||||
private static System.Type _classType;
|
||||
|
||||
public static string DryRunBuild()
|
||||
public static string SimulateBuild()
|
||||
{
|
||||
_classType = Assembly.Load("YooAsset.Editor").GetType("YooAsset.Editor.AssetBundleRuntimeBuilder");
|
||||
InvokePublicStaticMethod(_classType, "FastBuild");
|
||||
_classType = Assembly.Load("YooAsset.Editor").GetType("YooAsset.Editor.AssetBundleSimulateBuilder");
|
||||
InvokePublicStaticMethod(_classType, "SimulateBuild");
|
||||
return GetPatchManifestFilePath();
|
||||
}
|
||||
private static string GetPatchManifestFilePath()
|
||||
{
|
||||
return (string)InvokePublicStaticMethod(_classType, "GetPatchManifestFilePath");
|
||||
return (string)InvokePublicStaticMethod(_classType, "GetPatchManifestPath");
|
||||
}
|
||||
private static object InvokePublicStaticMethod(System.Type type, string method, params object[] parameters)
|
||||
{
|
||||
@@ -30,8 +30,8 @@ namespace YooAsset
|
||||
}
|
||||
}
|
||||
#else
|
||||
internal static class EditorPlayModeHelper
|
||||
internal static class EditorSimulateModeHelper
|
||||
{
|
||||
public static string DryRunBuild() { throw new System.Exception("Only support in unity editor !"); }
|
||||
public static string SimulateBuild() { throw new System.Exception("Only support in unity editor !"); }
|
||||
}
|
||||
#endif
|
||||
+2
-2
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal class EditorPlayModeImpl : IBundleServices
|
||||
internal class EditorSimulateModeImpl : IBundleServices
|
||||
{
|
||||
internal PatchManifest AppPatchManifest;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace YooAsset
|
||||
/// </summary>
|
||||
public InitializationOperation InitializeAsync()
|
||||
{
|
||||
var operation = new EditorPlayModeInitializationOperation(this);
|
||||
var operation = new EditorSimulateModeInitializationOperation(this);
|
||||
OperationSystem.ProcessOperaiton(operation);
|
||||
return operation;
|
||||
}
|
||||
Reference in New Issue
Block a user