# GetEntityId(string, EntityId)

> Retrieve an EntityId value.

## Definition

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

```csharp
public static EntityId GetEntityId(string key, EntityId defaultValue)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[EntityId]\(/engine/6000.7/script-reference/unityengine/entityid)):&#x20;

### Returns

| Type                                                                | Description |
| ------------------------------------------------------------------- | ----------- |
| [EntityId](/engine/6000.7/script-reference/unityengine/entityid.md) |             |
