Skip to content

Commit

Permalink
FIxed updater
Browse files Browse the repository at this point in the history
  • Loading branch information
Cibbi committed Oct 24, 2019
1 parent b600e36 commit 2f1454c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Editor/Utility/TSConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Cibbi.ToonyStandard
{
public static class TSConstants
{
public static string Version = "Toony Standard 1.1.1";
public static string Version = "Toony Standard 1.1.2";
public static string TSEPInspectorLevel = "TSInspectorLevel";
public static string TSEPNotFirstTime = "TSNotFirstTime";

Expand Down
4 changes: 2 additions & 2 deletions Editor/Utility/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,12 @@ public IEnumerator<float> DownloadUpdate()
if(updateStream==UpdateStream.Beta)
{
string localFolder=TSConstants.LocalShaderFolder;
Unzip zip= new Unzip(Application.dataPath+"/toonyStandard.zip");
// Deleting the old Toony standard version
if(Directory.Exists(TSConstants.LocalShaderFolder))
{
Directory.Delete(TSConstants.LocalShaderFolder,true);
}
Unzip zip= new Unzip(Application.dataPath+"/toonyStandard.zip");
// For each file in the zip we change the github repository path with the more user friendly one used on the releases, and then extract that file in that path
foreach (string fileName in zip.FileNames)
{
Expand All @@ -363,8 +363,8 @@ public IEnumerator<float> DownloadUpdate()
local.version="beta";
File.WriteAllText(TSConstants.LocalJSONPath,JsonUtility.ToJson(local));
// The asset database is refreshed to be sure that the zip file is actually detected from the asset database for its deletion
File.Delete(Application.dataPath+"/toonyStandard.zip");
AssetDatabase.Refresh(ImportAssetOptions.ImportRecursive);
AssetDatabase.DeleteAsset("Assets/toonyStandard.zip");

}
// If the update stream is the release one the downloaded file is the latest unitypackage that can be found here https://github.com/Cibbi/Toony-standard/releases
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.1.1","beta":false,"betaSha":""}
{"version":"1.1.2","beta":false,"betaSha":""}

0 comments on commit 2f1454c

Please sign in to comment.