打包逻辑完善
parent
385bfdbf20
commit
661ee1f796
|
@ -15,8 +15,7 @@ public class AutoPack : EditorWindow
|
|||
[MenuItem("自动化打包/一键导出")]
|
||||
private static void EzBuildPack()
|
||||
{
|
||||
curProjectDir = Environment.CurrentDirectory.Replace('\\', '/');
|
||||
Debug.Log("当前工程路径:"+curProjectDir);
|
||||
curProjectDir = Environment.CurrentDirectory.Replace('\\', '/');
|
||||
string[] _strArr = Directory.GetFiles(curProjectDir + "/AssetBundles/", "*.txt");
|
||||
Debug.Log("version列表数量:"+_strArr.Length);
|
||||
for (int i = 0; i < _strArr.Length; i++)
|
||||
|
@ -56,6 +55,7 @@ public class AutoPack : EditorWindow
|
|||
File.Delete(targetPath);
|
||||
}
|
||||
File.Copy(copyPath, targetPath, true);
|
||||
AssetDatabase.Refresh();
|
||||
if (isBuild)
|
||||
{
|
||||
Debug.Log("开始build资源");
|
||||
|
@ -96,6 +96,7 @@ public class AutoPack : EditorWindow
|
|||
Directory.Delete(outPath + "/ex_android_jl/", true);
|
||||
}
|
||||
EditorUserBuildSettings.exportAsGoogleAndroidProject = true;
|
||||
EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle;
|
||||
// 设置需要打包的场景
|
||||
string launchScene = _sceneName;
|
||||
Debug.Log("打包场景:" + launchScene);
|
||||
|
|
Loading…
Reference in New Issue