# PackageInfo

> Structure describing a Unity package.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.PackageManager](/engine/6000.5/script-reference/unityeditor/packagemanager.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public sealed class PackageInfo
```

## Remarks

A reference to a package in a registry, a revision of a source repository, a resource on the internet, or a package available on disk.

```csharp
using UnityEngine;
using UnityEditor.PackageManager;
using UnityEditor.PackageManager.Requests;
[ExecuteInEditMode]
public class PackageInfoExample : MonoBehaviour
{
    ListRequest m_ListRequest;

    void Start()
    {
        Debug.Log("Listing packages to get PackageInfo...");
        m_ListRequest = Client.List();
    }
    void Update()
    {
        if (m_ListRequest != null && m_ListRequest.IsCompleted)
        {
            if (m_ListRequest.Status == StatusCode.Success)
            {
                foreach (var packageInfo in m_ListRequest.Result)
                {
                    Debug.Log($"Package Name: {packageInfo.name}");
                    Debug.Log($"Package Display Name: {packageInfo.displayName}");
                    // etc.
                }
            }
            else
            {
                Debug.Log($"Package list request failed: {m_ListRequest.Error}");
            }
            m_ListRequest = null;
        }
    }
}
```

* [Request](/engine/6000.5/script-reference/unityeditor/packagemanager/requests/request.md)
* [Error](/engine/6000.5/script-reference/unityeditor/packagemanager/error.md)
* [StatusCode](/engine/6000.5/script-reference/unityeditor/packagemanager/statuscode.md)

## Properties

| Property                                                                                                               | Description                                                                                                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [assetPath](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/assetpath.md)                       | The asset path of the package in the AssetDatabase.                                                                                                                                                                            |
| [author](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/author.md)                             | An [AuthorInfo](/engine/6000.5/script-reference/unityeditor/packagemanager/authorinfo.md) instance of the author of the package.                                                                                               |
| [category](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/category.md)                         | Category of the package.                                                                                                                                                                                                       |
| [changelogUrl](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/changelogurl.md)                 | The custom URL for the changelog for the package.                                                                                                                                                                              |
| [datePublished](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/datepublished.md)               | The date and time at which the package was published.                                                                                                                                                                          |
| [dependencies](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/dependencies.md)                 | An array of DependencyInfos listing all the packages this package directly depends on.                                                                                                                                         |
| [deprecationMessage](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/deprecationmessage.md)     | Deprecation message for the version that this instance represents.                                                                                                                                                             |
| [description](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/description.md)                   | Detailed description of the package.                                                                                                                                                                                           |
| [displayName](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/displayname.md)                   | Friendly display name of the package.                                                                                                                                                                                          |
| [documentationUrl](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/documentationurl.md)         | The custom URL for documentation for the package.                                                                                                                                                                              |
| [errors](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/errors.md)                             | Errors that the Package Manager reports for this package.                                                                                                                                                                      |
| [git](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/git.md)                                   | A [GitInfo](/engine/6000.5/script-reference/unityeditor/packagemanager/gitinfo.md) instance providing detailed information for a Git package.                                                                                  |
| [isDeprecated](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/isdeprecated.md)                 | Set to `true` if the package version that this instance represents is deprecated.                                                                                                                                              |
| [isDirectDependency](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/isdirectdependency.md)     | If the package is a direct dependency of the project.                                                                                                                                                                          |
| [keywords](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/keywords.md)                         | An array of keywords associated with the package.                                                                                                                                                                              |
| [licensesUrl](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/licensesurl.md)                   | The custom URL for the licenses of a package.                                                                                                                                                                                  |
| [name](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/name.md)                                 | A read-only string property that contains the unique name of a package.                                                                                                                                                        |
| [packageId](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/packageid.md)                       | A read-only string property that provides the full package identifier, including the package name and version. For example, "com.unity.textmeshpro\@3.0.6".                                                                    |
| [registry](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/registry.md)                         | The registry where the Package Manager might find this package.                                                                                                                                                                |
| [repository](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/repository.md)                     | A [RepositoryInfo](/engine/6000.5/script-reference/unityeditor/packagemanager/repositoryinfo.md) instance containing information the repository that the package is hosted on.                                                 |
| [resolvedDependencies](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/resolveddependencies.md) | An array of [DependencyInfo](/engine/6000.5/script-reference/unityeditor/scenetemplate/dependencyinfo.md) instances listing all the packages this package directly or indirectly depends on and the versions they resolved to. |
| [resolvedPath](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/resolvedpath.md)                 | The local path of the package on disk.                                                                                                                                                                                         |
| [source](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/source.md)                             | Source of the package contents.                                                                                                                                                                                                |
| [type](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/type.md)                                 | Type of the package.                                                                                                                                                                                                           |
| [version](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/version.md)                           | Version of the package.                                                                                                                                                                                                        |
| [versions](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/versions.md)                         | A [VersionsInfo](/engine/6000.5/script-reference/unityeditor/packagemanager/versionsinfo.md) instance containing information about the available versions of the package.                                                      |

## Static Methods

| Method                                                                                                                         | Description                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| [FindForAssembly](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/findforassembly.md)                   | Retrieves information about the package containing an assembly, or the assembly definition used to build that assembly.            |
| [FindForAssetPath](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/findforassetpath.md)                 | Retrieves information about the package containing an asset based on the path of that asset.                                       |
| [FindForPackageName](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/findforpackagename.md)             | Retrieves information about the package based on the name of that package.                                                         |
| [GetAllRegisteredPackages](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/getallregisteredpackages.md) | Retrieves information about all packages that are currently loaded.                                                                |
| [IsPackageRegistered](/engine/6000.5/script-reference/unityeditor/packagemanager/packageinfo/ispackageregistered.md)           | Checks if a specific package is registered with the [AssetDatabase](/engine/6000.5/script-reference/unityeditor/assetdatabase.md). |
