diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll index 6267c0e..2b2f7e8 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb index 611e92e..1d98f4c 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll index 022e5d0..27f74d2 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb index 1f5a569..7520ca8 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll index dc615d6..23b0b35 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb index 5f0f7e2..adcaffe 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll index d8aa136..42b7fde 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb index 64afaaa..0636d3e 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll index f584da7..405fd43 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb index 707e6d4..9702dbf 100644 Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll index 6267c0e..2b2f7e8 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb index 611e92e..1d98f4c 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll index 022e5d0..27f74d2 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb index 1f5a569..7520ca8 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll index dc615d6..23b0b35 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb index 5f0f7e2..adcaffe 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll index d8aa136..42b7fde 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb index 64afaaa..0636d3e 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll index f584da7..405fd43 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb index 707e6d4..9702dbf 100644 Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll index 6267c0e..2b2f7e8 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb index 611e92e..1d98f4c 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll index 022e5d0..27f74d2 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb index 1f5a569..7520ca8 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll index dc615d6..23b0b35 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb index 5f0f7e2..adcaffe 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll index d8aa136..42b7fde 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb index 64afaaa..0636d3e 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll index f584da7..405fd43 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb index 707e6d4..9702dbf 100644 Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ diff --git a/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorGUIFramework.dll.meta b/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorGUIFramework.dll.meta index d445e92..b45fab1 100644 --- a/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorGUIFramework.dll.meta +++ b/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorGUIFramework.dll.meta @@ -1,7 +1,18 @@ fileFormatVersion: 2 guid: 11f311c200ce9de48b30e7dfedbfd165 -MonoAssemblyImporter: +PluginImporter: serializedVersion: 1 iconMap: {} executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll.meta b/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll.meta index fc389f3..ecc9f5c 100644 --- a/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll.meta +++ b/UnityTests.Unity5/Assets/Demigiant/HOUnityEditor/Editor/HOEditorUtils.dll.meta @@ -1,7 +1,18 @@ fileFormatVersion: 2 guid: 847d6a28ef5c2f44f929171872a9ff2e -MonoAssemblyImporter: +PluginImporter: serializedVersion: 1 iconMap: {} executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true userData: + assetBundleName: + assetBundleVariant: diff --git a/UnityTests.Unity5/Assets/Resources.meta b/UnityTests.Unity5/Assets/Resources.meta index 32947dc..bb9cc97 100644 --- a/UnityTests.Unity5/Assets/Resources.meta +++ b/UnityTests.Unity5/Assets/Resources.meta @@ -1,7 +1,7 @@ fileFormatVersion: 2 -guid: 6c68a80831d8da74087b61dad131dcd6 +guid: b4915b8ce4b86b54894a06a262c40129 folderAsset: yes -timeCreated: 1428751523 +timeCreated: 1428772022 licenseType: Free DefaultImporter: userData: diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOAnimation Dice as Child.prefab b/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOAnimation Dice as Child.prefab index 990d029..df5c02e 100644 Binary files a/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOAnimation Dice as Child.prefab and b/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOAnimation Dice as Child.prefab differ diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOAnimation Dice.prefab b/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOAnimation Dice.prefab index ce655eb..c19aa93 100644 Binary files a/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOAnimation Dice.prefab and b/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOAnimation Dice.prefab differ diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOPath Cube as Child.prefab b/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOPath Cube as Child.prefab index 3da96de..53d42d7 100644 Binary files a/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOPath Cube as Child.prefab and b/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOPath Cube as Child.prefab differ diff --git a/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOPath Cube.prefab b/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOPath Cube.prefab index 5c38c4b..f75f448 100644 Binary files a/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOPath Cube.prefab and b/UnityTests.Unity5/Assets/_Tests/_Shared Prefabs/DOPath Cube.prefab differ diff --git a/_DOTween.Assembly/DOTween/Core/DOTweenSettings.cs b/_DOTween.Assembly/DOTween/Core/DOTweenSettings.cs index d14b691..e8b00d3 100644 --- a/_DOTween.Assembly/DOTween/Core/DOTweenSettings.cs +++ b/_DOTween.Assembly/DOTween/Core/DOTweenSettings.cs @@ -27,7 +27,8 @@ namespace DG.Tweening.Core public enum SettingsLocation { AssetsDirectory, - DOTweenDirectory + DOTweenDirectory, + DemigiantDirectory } public SettingsLocation storeSettingsLocation = SettingsLocation.AssetsDirectory; } diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs index fc52716..a4f9564 100644 --- a/_DOTween.Assembly/DOTween/DOTween.cs +++ b/_DOTween.Assembly/DOTween/DOTween.cs @@ -21,7 +21,7 @@ namespace DG.Tweening public class DOTween { /// DOTween's version - public static readonly string Version = "1.0.465"; + public static readonly string Version = "1.0.470"; /////////////////////////////////////////////// // Options //////////////////////////////////// diff --git a/_DOTween.Assembly/DOTweenEditor/Core/EditorUtils.cs b/_DOTween.Assembly/DOTweenEditor/Core/EditorUtils.cs index 9520859..89d94ae 100644 --- a/_DOTween.Assembly/DOTweenEditor/Core/EditorUtils.cs +++ b/_DOTween.Assembly/DOTweenEditor/Core/EditorUtils.cs @@ -18,6 +18,8 @@ namespace DG.DOTweenEditor.Core public static string proVersion { get { if (!_hasCheckedForPro) CheckForPro(); return _proVersion; } } // Editor path from Assets (not included) with final slash, in AssetDatabase format (/) public static string editorADBDir { get { if (string.IsNullOrEmpty(_editorADBDir)) StoreEditorADBDir(); return _editorADBDir; } } + // With final slash (system based) - might be NULL in case users are not using a parent Demigiant folder + public static string demigiantDir { get { if (string.IsNullOrEmpty(_demigiantDir)) StoreDOTweenDirs(); return _demigiantDir; } } // With final slash (system based) public static string dotweenDir { get { if (string.IsNullOrEmpty(_dotweenDir)) StoreDOTweenDirs(); return _dotweenDir; } } // With final slash (system based) @@ -30,6 +32,7 @@ namespace DG.DOTweenEditor.Core static string _proVersion; static bool _hasCheckedForPro; static string _editorADBDir; + static string _demigiantDir; // with final slash static string _dotweenDir; // with final slash static string _dotweenProDir; // with final slash @@ -176,8 +179,13 @@ namespace DG.DOTweenEditor.Core _dotweenProDir = _dotweenDir.Substring(0, _dotweenDir.LastIndexOf(pathSeparator)); _dotweenProDir = _dotweenProDir.Substring(0, _dotweenProDir.LastIndexOf(pathSeparator) + 1) + "DOTweenPro" + pathSeparator; + _demigiantDir = _dotweenDir.Substring(0, _dotweenDir.LastIndexOf(pathSeparator)); + _demigiantDir = _demigiantDir.Substring(0, _demigiantDir.LastIndexOf(pathSeparator) + 1); + if (_demigiantDir.Substring(_demigiantDir.Length - 10, 9) != "Demigiant") _demigiantDir = null; + _dotweenDir = _dotweenDir.Replace(pathSlashToReplace, pathSlash); _dotweenProDir = _dotweenProDir.Replace(pathSlashToReplace, pathSlash); + if (_demigiantDir != null) _demigiantDir = _demigiantDir.Replace(pathSlashToReplace, pathSlash); } static void CreateScriptableAsset(string adbFilePath) where T : ScriptableObject diff --git a/_DOTween.Assembly/DOTweenEditor/DOTweenUtilityWindow.cs b/_DOTween.Assembly/DOTweenEditor/DOTweenUtilityWindow.cs index e8b21e8..3d93716 100644 --- a/_DOTween.Assembly/DOTweenEditor/DOTweenUtilityWindow.cs +++ b/_DOTween.Assembly/DOTweenEditor/DOTweenUtilityWindow.cs @@ -58,7 +58,7 @@ namespace DG.DOTweenEditor int _selectedTab; string[] _tabLabels = new[] { "Setup", "Preferences" }; - string[] _settingsLocation = new[] {"Assets > Resources", "DOTween > Resources"}; + string[] _settingsLocation = new[] {"Assets > Resources", "DOTween > Resources", "Demigiant > Resources"}; // If force is FALSE opens the window only if DOTween's version has changed // (set to FALSE by OnPostprocessAllAssets) @@ -184,7 +184,15 @@ namespace DG.DOTweenEditor _src.logBehaviour = (LogBehaviour)EditorGUILayout.EnumPopup("Log Behaviour", _src.logBehaviour); DOTweenSettings.SettingsLocation prevSettingsLocation = _src.storeSettingsLocation; _src.storeSettingsLocation = (DOTweenSettings.SettingsLocation)EditorGUILayout.Popup("Settings Location", (int)_src.storeSettingsLocation, _settingsLocation); - if (_src.storeSettingsLocation != prevSettingsLocation) Connect(true); + if (_src.storeSettingsLocation != prevSettingsLocation) { + if (_src.storeSettingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory && EditorUtils.demigiantDir == null) { + EditorUtility.DisplayDialog("Change DOTween Settings Location", "Demigiant directory not present (must be the parent of DOTween's directory)", "Ok"); + if (prevSettingsLocation == DOTweenSettings.SettingsLocation.DemigiantDirectory) { + _src.storeSettingsLocation = DOTweenSettings.SettingsLocation.AssetsDirectory; + Connect(true); + } else _src.storeSettingsLocation = prevSettingsLocation; + } else Connect(true); + } GUILayout.Space(8); GUILayout.Label("DEFAULTS ▼"); _src.defaultRecyclable = EditorGUILayout.Toggle("Recycle Tweens", _src.defaultRecyclable); @@ -207,70 +215,74 @@ namespace DG.DOTweenEditor { if (_src != null && !forceReconnect) return; - string externalSrcDir = EditorUtils.assetsPath + EditorUtils.pathSlash + "Resources"; - string externalSrcFilePath = externalSrcDir + EditorUtils.pathSlash + DOTweenSettings.AssetName + ".asset"; - string externalAdbSrcFilePath = EditorUtils.FullPathToADBPath(externalSrcFilePath); - string internalSrcDir = EditorUtils.dotweenDir + "Resources"; - string internalSrcFilePath = internalSrcDir + EditorUtils.pathSlash + DOTweenSettings.AssetName + ".asset"; - string internalAdbSrcFilePath = EditorUtils.FullPathToADBPath(internalSrcFilePath); + LocationData assetsLD = new LocationData(EditorUtils.assetsPath + EditorUtils.pathSlash + "Resources"); + LocationData dotweenLD = new LocationData(EditorUtils.dotweenDir + "Resources"); + bool hasDemigiantDir = EditorUtils.demigiantDir != null; + LocationData demigiantLD = hasDemigiantDir ? new LocationData(EditorUtils.demigiantDir + "Resources") : new LocationData(); if (_src == null) { // Load eventual existing settings - _src = EditorUtils.ConnectToSourceAsset(externalAdbSrcFilePath, false); - if (_src == null) _src = EditorUtils.ConnectToSourceAsset(internalAdbSrcFilePath, false); + _src = EditorUtils.ConnectToSourceAsset(assetsLD.adbFilePath, false); + if (_src == null) _src = EditorUtils.ConnectToSourceAsset(dotweenLD.adbFilePath, false); + if (_src == null && hasDemigiantDir) _src = EditorUtils.ConnectToSourceAsset(demigiantLD.adbFilePath, false); } if (_src == null) { // Settings don't exist. Create it in external folder - if (!Directory.Exists(externalSrcDir)) AssetDatabase.CreateFolder("Assets", "Resources"); - _src = EditorUtils.ConnectToSourceAsset(externalAdbSrcFilePath, true); + if (!Directory.Exists(assetsLD.dir)) AssetDatabase.CreateFolder(assetsLD.adbParentDir, "Resources"); + _src = EditorUtils.ConnectToSourceAsset(assetsLD.adbFilePath, true); } // Move eventual settings from previous location and setup everything correctly DOTweenSettings.SettingsLocation settingsLoc = _src.storeSettingsLocation; switch (settingsLoc) { case DOTweenSettings.SettingsLocation.AssetsDirectory: - if (!Directory.Exists(externalSrcDir)) AssetDatabase.CreateFolder("Assets", "Resources"); - if (File.Exists(internalSrcFilePath)) { - // Move internal src file to correct folder - AssetDatabase.MoveAsset(internalAdbSrcFilePath, externalAdbSrcFilePath); - // Delete internal Resources folder - AssetDatabase.DeleteAsset(EditorUtils.FullPathToADBPath(internalSrcDir)); - } - _src = EditorUtils.ConnectToSourceAsset(externalAdbSrcFilePath, true); + MoveSrc(new[] { dotweenLD, demigiantLD }, assetsLD); break; case DOTweenSettings.SettingsLocation.DOTweenDirectory: - if (!Directory.Exists(internalSrcDir)) AssetDatabase.CreateFolder(EditorUtils.FullPathToADBPath(EditorUtils.dotweenDir.Substring(0, EditorUtils.dotweenDir.LastIndexOf(EditorUtils.pathSlash))), "Resources"); - if (File.Exists(externalSrcFilePath)) { - // Move external src file to correct folder - AssetDatabase.MoveAsset(externalAdbSrcFilePath, internalAdbSrcFilePath); - // Delete external settings - AssetDatabase.DeleteAsset(externalAdbSrcFilePath); - // Check if external Resources folder is empty and in case delete it - if (Directory.GetDirectories(externalSrcDir).Length == 0 && Directory.GetFiles(externalSrcDir).Length == 0) { - AssetDatabase.DeleteAsset(EditorUtils.FullPathToADBPath(externalSrcDir)); - } - } - _src = EditorUtils.ConnectToSourceAsset(internalAdbSrcFilePath, true); + MoveSrc(new[] { assetsLD, demigiantLD }, dotweenLD); + break; + case DOTweenSettings.SettingsLocation.DemigiantDirectory: + MoveSrc(new[] { assetsLD, dotweenLD }, demigiantLD); break; } + } -// if (_src == null) { -// string srcDir = EditorUtils.assetsPath + EditorUtils.pathSlash + "Resources"; -// if (!Directory.Exists(srcDir)) AssetDatabase.CreateFolder("Assets", "Resources"); -// string adbSrcFilePath = EditorUtils.FullPathToADBPath(srcDir + EditorUtils.pathSlash + DOTweenSettings.AssetName + ".asset"); -// -// // Legacy: check if there are settings saved in previous mode and eventually move them -// string altSrcDir = EditorUtils.dotweenDir + "Resources"; -// string legacySrcFilePath = altSrcDir + EditorUtils.pathSlash + DOTweenSettings.AssetName + ".asset"; -// if (File.Exists(legacySrcFilePath)) { -// // Move legacy src file to correct folder -// AssetDatabase.MoveAsset(EditorUtils.FullPathToADBPath(legacySrcFilePath), adbSrcFilePath); -// // Delete legacy Resources folder -// AssetDatabase.DeleteAsset(EditorUtils.FullPathToADBPath(altSrcDir)); -// } -// -// _src = EditorUtils.ConnectToSourceAsset(adbSrcFilePath, true); -// } + void MoveSrc(LocationData[] from, LocationData to) + { + if (!Directory.Exists(to.dir)) AssetDatabase.CreateFolder(to.adbParentDir, "Resources"); + foreach (LocationData ld in from) { + if (File.Exists(ld.filePath)) { + // Move external src file to correct folder + AssetDatabase.MoveAsset(ld.adbFilePath, to.adbFilePath); + // Delete external settings + AssetDatabase.DeleteAsset(ld.adbFilePath); + // Check if external Resources folder is empty and in case delete it + if (Directory.GetDirectories(ld.dir).Length == 0 && Directory.GetFiles(ld.dir).Length == 0) { + AssetDatabase.DeleteAsset(EditorUtils.FullPathToADBPath(ld.dir)); + } + } + } + _src = EditorUtils.ConnectToSourceAsset(to.adbFilePath, true); + } + + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // ||| INTERNAL CLASSES |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + struct LocationData + { + public string dir; // without final slash + public string filePath; + public string adbFilePath; + public string adbParentDir; // without final slash + + public LocationData(string srcDir) : this() + { + dir = srcDir; + filePath = dir + EditorUtils.pathSlash + DOTweenSettings.AssetName + ".asset"; + adbFilePath = EditorUtils.FullPathToADBPath(filePath); + adbParentDir = EditorUtils.FullPathToADBPath(dir.Substring(0, dir.LastIndexOf(EditorUtils.pathSlash))); + } } } } \ No newline at end of file diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll index 6267c0e..2b2f7e8 100644 Binary files a/_DOTween.Assembly/bin/DOTween.dll and b/_DOTween.Assembly/bin/DOTween.dll differ diff --git a/_DOTween.Assembly/bin/DOTween.dll.mdb b/_DOTween.Assembly/bin/DOTween.dll.mdb index 611e92e..1d98f4c 100644 Binary files a/_DOTween.Assembly/bin/DOTween.dll.mdb and b/_DOTween.Assembly/bin/DOTween.dll.mdb differ diff --git a/_DOTween.Assembly/bin/DOTween43.dll b/_DOTween.Assembly/bin/DOTween43.dll index 022e5d0..27f74d2 100644 Binary files a/_DOTween.Assembly/bin/DOTween43.dll and b/_DOTween.Assembly/bin/DOTween43.dll differ diff --git a/_DOTween.Assembly/bin/DOTween43.dll.mdb b/_DOTween.Assembly/bin/DOTween43.dll.mdb index 1f5a569..7520ca8 100644 Binary files a/_DOTween.Assembly/bin/DOTween43.dll.mdb and b/_DOTween.Assembly/bin/DOTween43.dll.mdb differ diff --git a/_DOTween.Assembly/bin/DOTween46.dll b/_DOTween.Assembly/bin/DOTween46.dll index dc615d6..23b0b35 100644 Binary files a/_DOTween.Assembly/bin/DOTween46.dll and b/_DOTween.Assembly/bin/DOTween46.dll differ diff --git a/_DOTween.Assembly/bin/DOTween46.dll.mdb b/_DOTween.Assembly/bin/DOTween46.dll.mdb index 5f0f7e2..adcaffe 100644 Binary files a/_DOTween.Assembly/bin/DOTween46.dll.mdb and b/_DOTween.Assembly/bin/DOTween46.dll.mdb differ diff --git a/_DOTween.Assembly/bin/DOTween50.dll b/_DOTween.Assembly/bin/DOTween50.dll index d8aa136..42b7fde 100644 Binary files a/_DOTween.Assembly/bin/DOTween50.dll and b/_DOTween.Assembly/bin/DOTween50.dll differ diff --git a/_DOTween.Assembly/bin/DOTween50.dll.mdb b/_DOTween.Assembly/bin/DOTween50.dll.mdb index 64afaaa..0636d3e 100644 Binary files a/_DOTween.Assembly/bin/DOTween50.dll.mdb and b/_DOTween.Assembly/bin/DOTween50.dll.mdb differ diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll index f584da7..405fd43 100644 Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll differ diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb index 707e6d4..9702dbf 100644 Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb differ