CodeSmile AssetDatabase 1.10
Unity's AssetDatabase in enjoyable, consistent, concise, convenient, comprehensible, safe, documented form.
Loading...
Searching...
No Matches

◆ Import()

static void Import ( [NotNull] Path packagePath)
static

Silently imports a .unitypackage file at the given path.

Parameters
packagePathPath to file with the .unitypackage extension.
See also

Definition at line 38 of file Asset.Package.cs.

39 {
40 ThrowIf.ExtensionIsNotUnityPackage(packagePath);
41
42#if UNITY_6000_6_OR_NEWER
43 UnityEditor.AssetPackage.Package.Import(packagePath, interactive: false);
44#else
45 AssetDatabase.ImportPackage(packagePath, false);
46#endif
47 }