1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 17:26:03 +08:00

Removed auto-opening of panels and dialogues when DOTween is installed or removed (except for the one opened by the UpgradeManager)

This commit is contained in:
Demigiant 2018-08-10 11:25:20 +02:00
parent bac373e56b
commit 1d20e55fd8
12 changed files with 37 additions and 43 deletions

View File

@ -32,7 +32,7 @@ namespace DG.Tweening
public class DOTween public class DOTween
{ {
/// <summary>DOTween's version</summary> /// <summary>DOTween's version</summary>
public static readonly string Version = "1.2.080"; // Last version before modules: 1.1.755 public static readonly string Version = "1.2.100"; // Last version before modules: 1.1.755
/////////////////////////////////////////////// ///////////////////////////////////////////////
// Options //////////////////////////////////// // Options ////////////////////////////////////

View File

@ -34,15 +34,17 @@ namespace DG.DOTweenEditor
// Remove EditorPrefs // Remove EditorPrefs
EditorPrefs.DeleteKey(Application.dataPath + DOTweenUtilityWindow.Id); EditorPrefs.DeleteKey(Application.dataPath + DOTweenUtilityWindow.Id);
EditorPrefs.DeleteKey(Application.dataPath + DOTweenUtilityWindow.IdPro); EditorPrefs.DeleteKey(Application.dataPath + DOTweenUtilityWindow.IdPro);
// Remove scripting define symbols
DOTweenDefines.RemoveAllDefines(); // // The following is not necessary anymore since the Modules update
// // // Remove scripting define symbols
EditorUtility.DisplayDialog("DOTween Deleted", // DOTweenDefines.RemoveAllDefines();
"DOTween was deleted and all of its scripting define symbols removed." + // //
"\n\nThis might show an error depending on your previous setup." + // EditorUtility.DisplayDialog("DOTween Deleted",
" If this happens, please close and reopen Unity or reimport DOTween.", // "DOTween was deleted and all of its scripting define symbols removed." +
"Ok" // "\n\nThis might show an error depending on your previous setup." +
); // " If this happens, please close and reopen Unity or reimport DOTween.",
// "Ok"
// );
return AssetDeleteResult.DidNotDelete; return AssetDeleteResult.DidNotDelete;
} }
@ -59,39 +61,31 @@ namespace DG.DOTweenEditor
string[] dotweenEntries = System.Array.FindAll(importedAssets, name => name.Contains("DOTween") && !name.EndsWith(".meta") && !name.EndsWith(".jpg") && !name.EndsWith(".png")); string[] dotweenEntries = System.Array.FindAll(importedAssets, name => name.Contains("DOTween") && !name.EndsWith(".meta") && !name.EndsWith(".jpg") && !name.EndsWith(".png"));
bool dotweenImported = dotweenEntries.Length > 0; bool dotweenImported = dotweenEntries.Length > 0;
if (dotweenImported) { if (!dotweenImported) return;
// Delete old DOTween files
EditorUtils.DeleteLegacyNoModulesDOTweenFiles(); // Reapply modules
// Delete old DemiLib configuration DOTweenUtilityWindowModules.ApplyModulesSettings();
EditorUtils.DeleteOldDemiLibCore();
// Remove old legacy defines // // Delete old DOTween files
DOTweenDefines.RemoveAllLegacyDefines(); // EditorUtils.DeleteLegacyNoModulesDOTweenFiles();
// Reapply modules // // Delete old DemiLib configuration
DOTweenUtilityWindowModules.ApplyModulesSettings(); // EditorUtils.DeleteOldDemiLibCore();
// // // Remove old legacy defines
bool differentCoreVersion = EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.Id) != Application.dataPath + DOTween.Version; // DOTweenDefines.RemoveAllLegacyDefines();
bool differentProVersion = EditorUtils.hasPro && EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.IdPro) != Application.dataPath + EditorUtils.proVersion; // // Reapply modules
bool setupRequired = differentCoreVersion || differentProVersion; // DOTweenUtilityWindowModules.ApplyModulesSettings();
if (setupRequired) { // //
_setupDialogRequested = true; // bool differentCoreVersion = EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.Id) != Application.dataPath + DOTween.Version;
EditorPrefs.SetString(Application.dataPath + DOTweenUtilityWindow.Id, Application.dataPath + DOTween.Version); // bool differentProVersion = EditorUtils.hasPro && EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.IdPro) != Application.dataPath + EditorUtils.proVersion;
if (EditorUtils.hasPro) EditorPrefs.SetString(Application.dataPath + DOTweenUtilityWindow.IdPro, Application.dataPath + EditorUtils.proVersion); // bool setupRequired = differentCoreVersion || differentProVersion;
// EditorUtility.DisplayDialog("DOTween", // if (!setupRequired) return;
// differentCoreVersion //
// ? "New version of DOTween imported." + // _setupDialogRequested = true;
// "\n\nSelect \"Setup DOTween...\" in DOTween's Utility Panel to add/remove Modules." // EditorPrefs.SetString(Application.dataPath + DOTweenUtilityWindow.Id, Application.dataPath + DOTween.Version);
// : "New version of DOTween Pro imported." + // if (EditorUtils.hasPro) {
// " \n\nSelect \"Setup DOTween...\" in DOTween's Utility Panel to add/remove external Modules (TextMesh Pro/2DToolkit/etc).", // EditorPrefs.SetString(Application.dataPath + DOTweenUtilityWindow.IdPro, Application.dataPath + EditorUtils.proVersion);
// "Ok" // }
// ); // DOTweenUtilityWindow.Open();
DOTweenUtilityWindow.Open();
// Opening window after a postProcess doesn't work on Unity 3 so check that
// string[] vs = Application.unityVersion.Split("."[0]);
// int majorVersion = System.Convert.ToInt32(vs[0]);
// if (majorVersion >= 4) EditorUtils.DelayedCall(0.5f, DOTweenUtilityWindow.Open);
// EditorUtils.DelayedCall(8, ()=> _setupDialogRequested = false);
}
}
} }
} }
} }

Binary file not shown.