UnityEditor.PackageUtility.ExtractAndPrepareAssetList C# (CSharp) Method

ExtractAndPrepareAssetList() private method

private ExtractAndPrepareAssetList ( string packagePath, string &packageIconPath, bool &canPerformReInstall ) : UnityEditor.ImportPackageItem[]
packagePath string
packageIconPath string
canPerformReInstall bool
return UnityEditor.ImportPackageItem[]
        public static extern ImportPackageItem[] ExtractAndPrepareAssetList(string packagePath, out string packageIconPath, out bool canPerformReInstall);
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

        public static void ImportPackage(string packagePath, bool interactive)
        {
            if (string.IsNullOrEmpty(packagePath))
            {
                throw new ArgumentException("Path can not be empty or null", "packagePath");
            }

            string packageIconPath;
            bool   canPerformReInstall;

            ImportPackageItem[] items = PackageUtility.ExtractAndPrepareAssetList(packagePath, out packageIconPath, out canPerformReInstall);

            if (items == null)
            {
                return;
            }

            if (interactive)
            {
                PackageImport.ShowImportPackage(packagePath, items, packageIconPath, canPerformReInstall);
            }
            else
            {
                string packageName = System.IO.Path.GetFileNameWithoutExtension(packagePath);
                PackageUtility.ImportPackageAssets(packageName, items, false);
            }
        }
All Usage Examples Of UnityEditor.PackageUtility::ExtractAndPrepareAssetList