5using System.Diagnostics.CodeAnalysis;
10 public sealed partial class Asset
28 public static String[]
All => AssetDatabase.GetAllAssetBundleNames();
38 public static String[]
Unused => AssetDatabase.GetUnusedAssetBundleNames();
51 public static void RemoveUnused() => AssetDatabase.RemoveUnusedAssetBundleNames();
63 public static void Remove([NotNull] String bundleName) => AssetDatabase.RemoveAssetBundleName(bundleName,
false);
75 public static void ForceRemove([NotNull] String bundleName) => AssetDatabase.RemoveAssetBundleName(bundleName,
true);
88 AssetDatabase.GetAssetBundleDependencies(bundleName,
false);
101 AssetDatabase.GetAssetBundleDependencies(bundleName,
true);
113 public static String[]
GetAllPaths([NotNull] String bundleName) => AssetDatabase.GetAssetPathsFromAssetBundle(bundleName);
126 public static String[]
GetPaths([NotNull] String bundleName, [NotNull] String assetName) =>
127 AssetDatabase.GetAssetPathsFromAssetBundleAndAssetName(bundleName, assetName);
142 public static String
GetOwningBundle([NotNull]
Path path) => AssetDatabase.GetImplicitAssetBundleName(path);
static void RemoveUnused()
Removes all unused asset bundles.
static String[] Unused
Returns all unused asset bundle names.
static String GetOwningBundle([NotNull] Path path)
Returns the bundle name that contains the asset path.
static String GetOwningBundleVariant([NotNull] Path path)
Returns the bundle variant name that contains the asset path.
static void ForceRemove([NotNull] String bundleName)
Removes a specific asset bundle by name.
static String[] All
Returns all asset bundle names.
static String[] GetDirectDependencies([NotNull] String bundleName)
Returns the bundle names that the given asset bundle directly depends on.
static String[] GetAllPaths([NotNull] String bundleName)
Returns all asset paths that are part of a given asset bundle.
static String[] GetPaths([NotNull] String bundleName, [NotNull] String assetName)
Returns the asset paths in a given asset bundle that matches an asset name.
static String[] GetAllDependencies([NotNull] String bundleName)
Returns all bundle names that the given asset bundle depends on, directly or indirectly (recursive).
static void Remove([NotNull] String bundleName)
Removes a specific asset bundle by name.
Groups all asset bundle related functionality.
Represents a relative path to an asset file or folder, typically under 'Assets' or 'Packages'.
Replacement implementation for Unity's massive AssetDatabase class with a cleaner interface and more ...