diff --git a/scripts/project_update.py b/scripts/project_update.py index 0aa2602..7579352 100644 --- a/scripts/project_update.py +++ b/scripts/project_update.py @@ -229,6 +229,10 @@ storePassword=123456 FileUtils.delete(dst, True) FileUtils.decompress(res_path, temp_dst) + build_path = os.path.join(temp_dst, "build") + if os.path.exists(build_path): + FileUtils.delete(build_path, True) + if os.listdir(temp_dst).index("unityLibrary") >= 0: FileUtils.copy(os.path.join(temp_dst, "unityLibrary"), dst) else: @@ -239,7 +243,8 @@ storePassword=123456 text = text.replace("compileSdkVersion", """ namespace "com.unity3d.player" compileSdkVersion""") - text = text.replace("unityStreamingAssets.tokenize(', ')", '[".unity3d", ".bundle", ".version", ".bytes", ".hash"]') + text = text.replace("unityStreamingAssets.tokenize(', ')", + '[".unity3d", ".bundle", ".version", ".bytes", ".hash"]') text = text.replace("apply plugin: 'com.android.library'", """ plugins { id 'com.android.library'