# GetMainAssetEntityId(string)

> Returns an asset EntityId.

## Definition

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

```csharp
public static EntityId GetMainAssetEntityId(string assetPath)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Asset path.

### Returns

| Type                                                                | Description                     |
| ------------------------------------------------------------------- | ------------------------------- |
| [EntityId](/engine/6000.6/script-reference/unityengine/entityid.md) | The EntityId of the main asset. |

### Remarks

This function try not to load the asset if possible.
