# GUIDFromAssetPath(string)

> Get the GUID for the asset at path.

## Definition

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

```csharp
public static GUID GUIDFromAssetPath(string path)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Project relative path for the asset.

### Returns

| Type | Description                                                            |
| ---- | ---------------------------------------------------------------------- |
| GUID | The GUID of the asset. An all-zero GUID denotes an invalid asset path. |

### Remarks

All paths are relative to the project folder, for example: "Assets/MyTextures/hello.png".

### Examples

```csharp
using UnityEngine;
using UnityEditor;

public static class Example
{
    [MenuItem("AssetDatabase/GUIDFromAssetPath")]
    static void Doit()
    {
        GUID t = AssetDatabase.GUIDFromAssetPath("Assets/texture.jpg");
        Debug.Log(t.ToString());
    }
}
```
