# GetAssetByGUID(string)

> Returns version control information about an asset from a given GUID.

## Definition

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

```csharp
public static Asset GetAssetByGUID(string guid)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): GUID of asset.

### Returns

| Type                                                                         | Description |
| ---------------------------------------------------------------------------- | ----------- |
| [Asset](/engine/6000.6/script-reference/unityeditor/versioncontrol/asset.md) |             |

### Remarks

Returns null if the GUID is not known by the Unity Editor.

### Examples

```csharp
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.VersionControl;
using UnityEngine;

public class EditorScript : MonoBehaviour
{
    [MenuItem("Version Control/GetAssetByGUID")]
    static void ExampleGetAssetByGUID()
    {
        string guid = AssetDatabase.AssetPathToGUID("Assets/ExampleAsset.mat");
        AssetList assets = new AssetList();
        assets.Add(Provider.GetAssetByGUID(guid));
        Debug.Log("Found an asset:  " + assets[0].name.ToString());
    }
}
```
