# GetAssetPathFromTextMetaFilePath(string)

> Gets the path to the asset file associated with a text.meta file.

## Definition

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

```csharp
public static string GetAssetPathFromTextMetaFilePath(string path)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The .meta file name.

### Returns

| Type                                                           | Description |
| -------------------------------------------------------------- | ----------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) |             |

### Examples

```csharp
using System.IO;
using UnityEditor;
using UnityEngine;

 public class AssetDatabaseExamples : MonoBehaviour
 {
     [MenuItem("AssetDatabase/Get All Assets With Meta File")]
     static void GetAllAssetsWithMetaFiles()
     {
         var files = Directory.GetFiles("Assets/", "*.meta", SearchOption.AllDirectories);

         foreach (var file in files)
         {
             var path = AssetDatabase.GetAssetPathFromTextMetaFilePath(file);
             Debug.Log(path);
         }
     }
 }
```
