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:
parent
bac373e56b
commit
1d20e55fd8
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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 ////////////////////////////////////
|
||||||
|
|||||||
@ -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();
|
|
||||||
// Delete old DemiLib configuration
|
|
||||||
EditorUtils.DeleteOldDemiLibCore();
|
|
||||||
// Remove old legacy defines
|
|
||||||
DOTweenDefines.RemoveAllLegacyDefines();
|
|
||||||
// Reapply modules
|
// Reapply modules
|
||||||
DOTweenUtilityWindowModules.ApplyModulesSettings();
|
DOTweenUtilityWindowModules.ApplyModulesSettings();
|
||||||
//
|
|
||||||
bool differentCoreVersion = EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.Id) != Application.dataPath + DOTween.Version;
|
// // Delete old DOTween files
|
||||||
bool differentProVersion = EditorUtils.hasPro && EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.IdPro) != Application.dataPath + EditorUtils.proVersion;
|
// EditorUtils.DeleteLegacyNoModulesDOTweenFiles();
|
||||||
bool setupRequired = differentCoreVersion || differentProVersion;
|
// // Delete old DemiLib configuration
|
||||||
if (setupRequired) {
|
// EditorUtils.DeleteOldDemiLibCore();
|
||||||
_setupDialogRequested = true;
|
// // Remove old legacy defines
|
||||||
EditorPrefs.SetString(Application.dataPath + DOTweenUtilityWindow.Id, Application.dataPath + DOTween.Version);
|
// DOTweenDefines.RemoveAllLegacyDefines();
|
||||||
if (EditorUtils.hasPro) EditorPrefs.SetString(Application.dataPath + DOTweenUtilityWindow.IdPro, Application.dataPath + EditorUtils.proVersion);
|
// // Reapply modules
|
||||||
// EditorUtility.DisplayDialog("DOTween",
|
// DOTweenUtilityWindowModules.ApplyModulesSettings();
|
||||||
// differentCoreVersion
|
// //
|
||||||
// ? "New version of DOTween imported." +
|
// bool differentCoreVersion = EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.Id) != Application.dataPath + DOTween.Version;
|
||||||
// "\n\nSelect \"Setup DOTween...\" in DOTween's Utility Panel to add/remove Modules."
|
// bool differentProVersion = EditorUtils.hasPro && EditorPrefs.GetString(Application.dataPath + DOTweenUtilityWindow.IdPro) != Application.dataPath + EditorUtils.proVersion;
|
||||||
// : "New version of DOTween Pro imported." +
|
// bool setupRequired = differentCoreVersion || differentProVersion;
|
||||||
// " \n\nSelect \"Setup DOTween...\" in DOTween's Utility Panel to add/remove external Modules (TextMesh Pro/2DToolkit/etc).",
|
// if (!setupRequired) return;
|
||||||
// "Ok"
|
//
|
||||||
// );
|
// _setupDialogRequested = true;
|
||||||
DOTweenUtilityWindow.Open();
|
// EditorPrefs.SetString(Application.dataPath + DOTweenUtilityWindow.Id, Application.dataPath + DOTween.Version);
|
||||||
// Opening window after a postProcess doesn't work on Unity 3 so check that
|
// if (EditorUtils.hasPro) {
|
||||||
// string[] vs = Application.unityVersion.Split("."[0]);
|
// EditorPrefs.SetString(Application.dataPath + DOTweenUtilityWindow.IdPro, Application.dataPath + EditorUtils.proVersion);
|
||||||
// int majorVersion = System.Convert.ToInt32(vs[0]);
|
// }
|
||||||
// if (majorVersion >= 4) EditorUtils.DelayedCall(0.5f, DOTweenUtilityWindow.Open);
|
// DOTweenUtilityWindow.Open();
|
||||||
// EditorUtils.DelayedCall(8, ()=> _setupDialogRequested = false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user