static void CopyAssetBundlesTo(string outputPath) { // Clear streaming assets folder. FileUtil.DeleteFileOrDirectory(Application.streamingAssetsPath); Directory.CreateDirectory(outputPath); string outputFolder = AssetBundlePlatformPathManager.GetPlatformFolderForAssetBundles(EditorUserBuildSettings.activeBuildTarget); // Setup the source folder for assetbundles. var source = AssetBundlePlatformPathManager.GetAssetBundleStorePath(); if (!System.IO.Directory.Exists(source)) { Debug.Log("No assetBundle output folder, try to build the assetBundles first."); } // Setup the destination folder for assetbundles. var destination = outputPath + outputFolder; if (System.IO.Directory.Exists(destination)) { FileUtil.DeleteFileOrDirectory(destination); } FileUtil.CopyFileOrDirectory(source, destination); }
public static string GetAssetBundleStorePath() { string outputPath = Path.Combine(AssetBundlePlatformPathManager.kAssetBundlesPath, AssetBundlePlatformPathManager.GetPlatformFolderForAssetBundles(EditorUserBuildSettings.activeBuildTarget)); string fullpath = Application.dataPath + "/../../Share/" + outputPath; return(fullpath); }