private static void CleanupLegacyUserFiles() { // Todo: This partially fails because we can't delete the loaded sqlite3 dll. // Causes no problems for the migration here, but leaves files for the user to delete // Remove Old Ludiq folder, including project settings and unit database var rootPath = MigrationUtility_1_4_13_to_1_5_1.GetLegacyRootPath("Bolt.Core"); var ludiqFolderFullPath = Directory.GetParent(rootPath).FullName; var ludiqFolderAssetPath = Path.Combine("Assets", PathUtility.FromAssets(ludiqFolderFullPath)); AssetDatabase.DeleteAsset(ludiqFolderAssetPath); }
public static DictionaryAsset GetLegacyProjectSettingsAsset(string pluginId) { try { var settingsFullPath = Path.Combine(Paths.assets, "Unity.VisualScripting.Generated", pluginId, "ProjectSettings.asset"); var settingsAssetPath = Path.Combine("Assets", PathUtility.FromAssets(settingsFullPath)); var asset = AssetDatabase.LoadAssetAtPath <DictionaryAsset>(settingsAssetPath); return(asset); } catch (Exception) { return(null); } }
public static string GetLegacyIconMapAssetPath(string pluginId) { try { var rootPath = GetLegacyRootPath(pluginId); var iconMapFullPath = Path.Combine(rootPath, "IconMap"); var iconMapAssetPath = Path.Combine("Assets", PathUtility.FromAssets(iconMapFullPath)); return(iconMapAssetPath); } catch (Exception) { return(null); } }
private static void RemoveLegacyPackageFiles() { // Todo: This partially fails because we can't delete the loaded sqlite3 dll. // Causes no problems for the migration here, but leaves files for the user to delete // Remove Assemblies var rootPath = MigrationUtility_1_4_13_to_1_5_1.GetLegacyRootPath("Bolt.Core"); var assembliesFullPath = $"{Directory.GetParent(rootPath).FullName}/Assemblies"; var assembliesAssetPath = Path.Combine("Assets", PathUtility.FromAssets(assembliesFullPath)); // Todo: This currently fails because of the sqlite dll. Deletes everything else AssetDatabase.DeleteAsset(assembliesAssetPath); // Remove icon map files AssetDatabase.DeleteAsset(MigrationUtility_1_4_13_to_1_5_1.GetLegacyIconMapAssetPath("Bolt.Core")); AssetDatabase.DeleteAsset(MigrationUtility_1_4_13_to_1_5_1.GetLegacyIconMapAssetPath("Bolt.Flow")); AssetDatabase.DeleteAsset(MigrationUtility_1_4_13_to_1_5_1.GetLegacyIconMapAssetPath("Bolt.State")); }