ImportPackage(string, bool)
Imports the package at packagePath into the current project.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor.CoreModule
public static void ImportPackage(string packagePath, bool interactive)
Parameters
Examples
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); } }}