Skip to content

Commit

Permalink
delete il2cpp cache
Browse files Browse the repository at this point in the history
  • Loading branch information
noodle1983 committed Jul 12, 2020
1 parent 718cfb3 commit 12adde6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Assets/AndroidIl2cppPatchDemo/Script/VersionSettor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,21 @@ public void OnClickSetVersion()
if (!string.IsNullOrEmpty(error))
{
messageBox.Show("use failed. empty path error:" + error, "ok", ()=> { messageBox.Close(); });
return;
}
else

string cacheDir = Application.persistentDataPath + "/il2cpp";
if (Directory.Exists(cacheDir))
{
DeleteDirectory(cacheDir);
}

if (Directory.Exists(cacheDir))
{
StartCoroutine(Restart());
messageBox.Show("failed to delete pre Unity cached file. path:" + cacheDir, "ok", () => { messageBox.Close(); });
return;
}
StartCoroutine(Restart());
return;
}
StartCoroutine(PreparePatchAndRestart());
Expand Down

0 comments on commit 12adde6

Please sign in to comment.