5using System.Diagnostics.CodeAnalysis;
10 public sealed partial class Asset
30 [ExcludeFromCodeCoverage]
33 ThrowIf.ExtensionIsNotUnityPackage(packagePath);
35 AssetDatabase.ImportPackage(packagePath,
false);
48 [ExcludeFromCodeCoverage]
51 ThrowIf.ExtensionIsNotUnityPackage(packagePath);
53 AssetDatabase.ImportPackage(packagePath,
true);
69 public static void Export([NotNull]
Path assetPath, [NotNull] String packagePath,
70 ExportPackageOptions options = ExportPackageOptions.Default)
72 ThrowIf.ExtensionIsNotUnityPackage(packagePath);
74 AssetDatabase.ExportPackage(assetPath, packagePath, options);
90 public static void Export([NotNull]
Path[] assetPaths, [NotNull] String packagePath,
91 ExportPackageOptions options = ExportPackageOptions.Default) =>
107 public static void Export([NotNull] String[] assetPaths, [NotNull] String packagePath,
108 ExportPackageOptions options = ExportPackageOptions.Default)
110 ThrowIf.ExtensionIsNotUnityPackage(packagePath);
112 AssetDatabase.ExportPackage(assetPaths, packagePath, options);
static void Export([NotNull] Path[] assetPaths, [NotNull] String packagePath, ExportPackageOptions options=ExportPackageOptions.Default)
Exports multiple assets and their dependencies to the packagePath file.
static void Export([NotNull] String[] assetPaths, [NotNull] String packagePath, ExportPackageOptions options=ExportPackageOptions.Default)
Exports multiple assets and their dependencies to the packagePath file.
static void ImportInteractive([NotNull] Path packagePath)
Imports a .unitypackage file at the given path interactively.
static void Export([NotNull] Path assetPath, [NotNull] String packagePath, ExportPackageOptions options=ExportPackageOptions.Default)
Exports the asset and its dependencies to a .unitypackage file.
static void Import([NotNull] Path packagePath)
Silently imports a .unitypackage file at the given path.
Groups import/export functionality for .unitypackage files (Asset Packages).
static String[] ToStrings([NotNull] IEnumerable< Path > paths)
Converts an IEnumerable collection of Path instances to a string array.
Represents a relative path to an asset file or folder, typically under 'Assets' or 'Packages'.