public static AssetBundleManifest BuildAssetBundle(BuildTarget buildTarget) { TestResourcesEditorSettingsData settings = TestResourcesEditorSettings.Settings.GetData(); AssetBundleBuildInfo build = GetAssetBundleBuildInfo(settings.AssetBundleName, settings.Folders); string outputPath = TestResourcesEditorSettings.GetAssetBundleOutputPath(); Directory.CreateDirectory(outputPath); return(AssetBundleBuildUtility.Build(new[] { build }, outputPath, buildTarget, settings.AssetBundleOptions)); }
private void UpdateAssetBundleDrawer() { m_assetBundleDrawer.Clear(); if (m_displayAssetBundleInfo) { string path = TestResourcesEditorSettings.GetAssetBundlePath(); if (File.Exists(path)) { m_assetBundleDrawer.Set(path); } } }
public static void ClearAssetBundle() { string outputPath = TestResourcesEditorSettings.GetAssetBundleOutputPath(); string metaPath = $"{outputPath}.meta"; if (Directory.Exists(outputPath)) { Directory.Delete(outputPath, true); } if (File.Exists(metaPath)) { File.Delete(metaPath); } }
public static bool IsAssetBundleExists() { string path = TestResourcesEditorSettings.GetAssetBundlePath(); return(File.Exists(path)); }