# CreateRecordKey

> Creates a record key from a document identifier and a property path.

## Definition

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

## CreateRecordKey(string, string)

Creates a record key from a document identifier and a property path.

```csharp
public static PropertyDatabaseRecordKey CreateRecordKey(string documentId, string propertyPath)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A document identifier.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A property path or name.

### Returns

| Type                                                                                                         | Description     |
| ------------------------------------------------------------------------------------------------------------ | --------------- |
| [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md) | The record key. |

### Remarks

Additional Resources: [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md), [PropertyDatabase.Store](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/store.md), [PropertyDatabase.TryLoad](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/tryload.md) and [PropertyDatabase.Invalidate](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/invalidate.md).

## CreateRecordKey(ulong, Hash128)

Creates a record key from a document key and a property hash.

```csharp
public static PropertyDatabaseRecordKey CreateRecordKey(ulong documentKey, Hash128 propertyPathHash)
```

### Parameters

**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): A document key.**** (Hash128): A property hash.

### Returns

| Type                                                                                                         | Description     |
| ------------------------------------------------------------------------------------------------------------ | --------------- |
| [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md) | The record key. |

### Remarks

Additional Resources: [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md), [PropertyDatabase.CreateDocumentKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/createdocumentkey.md), [PropertyDatabase.CreatePropertyHash](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/createpropertyhash.md), [PropertyDatabase.Store](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/store.md), [PropertyDatabase.TryLoad](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/tryload.md) and [PropertyDatabase.Invalidate](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/invalidate.md).

## CreateRecordKey(string)

Creates a record key from a property path.

```csharp
public static PropertyDatabaseRecordKey CreateRecordKey(string propertyPath)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A property path or name.

### Returns

| Type                                                                                                         | Description     |
| ------------------------------------------------------------------------------------------------------------ | --------------- |
| [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md) | The record key. |

### Remarks

The document identifier will be considered as null and the document key will be 0.

Additional Resources: [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md), [PropertyDatabase.Store](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/store.md), [PropertyDatabase.TryLoad](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/tryload.md) and [PropertyDatabase.Invalidate](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/invalidate.md).

## CreateRecordKey(string, Hash128)

Creates a record key from a document identifier and a property hash.

```csharp
public static PropertyDatabaseRecordKey CreateRecordKey(string documentId, Hash128 propertyHash)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A document identifier.**** (Hash128): A property hash.

### Returns

| Type                                                                                                         | Description     |
| ------------------------------------------------------------------------------------------------------------ | --------------- |
| [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md) | The record key. |

### Remarks

Additional Resources: [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md), [PropertyDatabase.CreatePropertyHash](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/createpropertyhash.md), [PropertyDatabase.Store](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/store.md), [PropertyDatabase.TryLoad](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/tryload.md) and [PropertyDatabase.Invalidate](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/invalidate.md).

## CreateRecordKey(Hash128)

Creates a record key from a property hash.

```csharp
public static PropertyDatabaseRecordKey CreateRecordKey(Hash128 propertyHash)
```

### Parameters

**** (Hash128): A property hash.

### Returns

| Type                                                                                                         | Description     |
| ------------------------------------------------------------------------------------------------------------ | --------------- |
| [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md) | The record key. |

### Remarks

The document identifier will be considered as null and the document key will be 0.

Additional Resources: [PropertyDatabaseRecordKey](/engine/6000.7/script-reference/unityeditor/search/propertydatabaserecordkey.md), [PropertyDatabase.CreatePropertyHash](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/createpropertyhash.md), [PropertyDatabase.Store](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/store.md), [PropertyDatabase.TryLoad](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/tryload.md) and [PropertyDatabase.Invalidate](/engine/6000.7/script-reference/unityeditor/search/propertydatabase/invalidate.md).
