# ImportPackage(string, bool)

> Imports the package at packagePath into the current project.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.6/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

> **Warning:**
>
> **Deprecated.** Use UnityEditor.AssetPackage.Package.Import(string packagePath, bool interactive) instead.

```csharp
public static void ImportPackage(string packagePath, bool interactive)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The path to the package.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to true to open an import dialog box on import. Set to false to import all assets in the package into the project.

### Remarks

Obsolete. Use [Package.Import](/engine/6000.6/script-reference/unityeditor/assetpackage/package/import.md) instead.

### Examples

```csharp
using UnityEditor;
using UnityEngine;

public class AssetDatabaseExamples : MonoBehaviour
{
    [MenuItem("AssetDatabase/Import Package Example")]
    static void ImportPackageExample()
    {
        var texturePackageNames = new[] {"groundTextures2k.unitypackage", "groundTextures4k.unitypackage"};
        foreach (var package in texturePackageNames)
        {
            AssetDatabase.ImportPackage(package, false);
        }
    }
}
```
