public static void InstallLibFolder(string source, string destination) { if (!SA_AssetDatabase.IsDirectoryExists(source)) { Debug.LogError("Can't find the source lib folder at path: " + source); return; } //Clean before install if (SA_AssetDatabase.IsDirectoryExists(destination)) { SA_AssetDatabase.DeleteAsset(destination); } SA_AssetDatabase.CopyAsset(source, destination); EnableLibsAtPath(destination); }
public static void InstallLibs(string source, string destination, List <string> libs) { for (int i = 0; i < libs.Count; i++) { var lib = libs[i]; string disabledLib = lib + DISABLED_LIB_EXTENSION; string sourcePath = source + disabledLib; string destinationPath = destination + lib; if (!SA_AssetDatabase.IsFileExists(sourcePath)) { Debug.LogError("Can't find the source lib folder at path: " + sourcePath); continue; } float progress = (float)(i + 1) / (float)libs.Count; EditorUtility.DisplayProgressBar("Stan's Assets.", "Installing: " + lib, progress); SA_AssetDatabase.CopyAsset(sourcePath, destinationPath); } EditorUtility.ClearProgressBar(); }