public void OnPreprocessBuild(BuildTarget target, string path) { BuildScript.CopyAssetBundlesTo(Path.Combine(Application.streamingAssetsPath, Assets.AssetBundles)); var platformName = BuildScript.GetPlatformName(); var searchPath = Path.Combine(Path.Combine(Application.streamingAssetsPath, Assets.AssetBundles), platformName); if (!Directory.Exists(searchPath)) { return; } var files = Directory.GetFiles(searchPath, "*.manifest", SearchOption.AllDirectories); foreach (var file in files) { var info = new FileInfo(file); if (info.Exists) { info.Delete(); } } files = Directory.GetFiles(searchPath, "*.meta", SearchOption.AllDirectories); foreach (var item in files) { var info = new FileInfo(item); info.Delete(); } }
public void OnPreprocessBuild(BuildTarget target, string path) { var destination = Path.Combine(Application.streamingAssetsPath, Assets.AssetBundles); if (Directory.Exists(destination)) { FileUtil.DeleteFileOrDirectory(destination); } var settings = BuildScript.GetSettings(); if (settings.copyToStreamingAssets) { BuildScript.CopyAssetBundlesTo(Application.streamingAssetsPath); } }
private static void CopyAssetBundles() { BuildScript.CopyAssetBundlesTo(Application.streamingAssetsPath); }
private static void CopyAssetBundles() { BuildScript.CopyAssetBundlesTo(Application.streamingAssetsPath); Log.Print("Successfully copied asset bundles into streaming assets"); }
private static void CopyAssetBundles() { BuildScript.CopyAssetBundlesTo(Path.Combine(Application.streamingAssetsPath, Assets.AssetBundles)); AssetDatabase.Refresh(); }