# FindForAssetPath(string)

> Retrieves information about the package containing an asset based on the path of that asset.

## Definition

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

```csharp
public static PackageInfo FindForAssetPath(string assetPath)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The project-relative path to the asset (for example, "Packages/com.company.mypackage/Scripts/MyScript.cs").

### Returns

| Type                                                                                     | Description                                                                                                                                                             |
| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PackageInfo](/engine/6000.6/script-reference/unityeditor/packagemanager/packageinfo.md) | The [PackageInfo](/engine/6000.6/script-reference/unityeditor/packagemanager/packageinfo.md) instance describing the package, or null if the asset is not in a package. |

### Remarks

This method works for assets residing inside the 'Packages/' folder and belonging to the following package types:

* Embedded packages
* Registry packages
* Git packages
* Local packages
* Built-in packages

This method doesn't work for assets inside the 'Assets/' folder (such as imported Asset Store packages or project-specific assets).

### Examples

```csharp
using UnityEditor;
using UnityEngine;
using PackageInfo = UnityEditor.PackageManager.PackageInfo;

public class FindPackageForAssetExample
{
    [MenuItem("Tools/Find Package For Asset Example")]
    public static void RunExample()
    {
        string assetPath = "Packages/com.unity.modules.physics/Physics.cs"; // Change as needed
        PackageInfo info = PackageInfo.FindForAssetPath(assetPath);

        if (info != null)
        {
            Debug.Log($"Asset '{assetPath}' is part of package: {info.name} ({info.source})");
            Debug.Log($"Display Name: {info.displayName}");
            Debug.Log($"Version: {info.version}");
        }
        else
        {
            Debug.Log($"Asset '{assetPath}' is not part of any package.");
        }
    }
}
```
