# CreateRecordKey

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

## Definition

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

## CreateRecordKey(string, string)

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

```csharp
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.6/script-reference/unityeditor/search/propertydatabaserecordkey.md) | The record key. |

### Remarks

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

## CreateRecordKey(ulong, Hash128)

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

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

### Parameters

**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): A document key.**** (\[Hash128]\(/engine/6000.6/script-reference/unityengine/hash128)): A property hash.

### Returns

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

### Remarks

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

## CreateRecordKey(string)

Creates a record key from a property path.

```csharp
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.6/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.6/script-reference/unityeditor/search/propertydatabaserecordkey.md), [IPropertyDatabaseView.Store](/engine/6000.6/script-reference/unityeditor/search/ipropertydatabaseview/store.md), [IPropertyDatabaseView.TryLoad](/engine/6000.6/script-reference/unityeditor/search/ipropertydatabaseview/tryload.md) and [IPropertyDatabaseView.Invalidate](/engine/6000.6/script-reference/unityeditor/search/ipropertydatabaseview/invalidate.md).

## CreateRecordKey(string, Hash128)

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

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

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A document identifier.**** (\[Hash128]\(/engine/6000.6/script-reference/unityengine/hash128)): A property hash.

### Returns

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

### Remarks

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

## CreateRecordKey(Hash128)

Creates a record key from a property hash.

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

### Parameters

**** (\[Hash128]\(/engine/6000.6/script-reference/unityengine/hash128)): A property hash.

### Returns

| Type                                                                                                         | Description     |
| ------------------------------------------------------------------------------------------------------------ | --------------- |
| [PropertyDatabaseRecordKey](/engine/6000.6/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.6/script-reference/unityeditor/search/propertydatabaserecordkey.md), [IPropertyDatabaseView.CreatePropertyHash](/engine/6000.6/script-reference/unityeditor/search/ipropertydatabaseview/createpropertyhash.md), [IPropertyDatabaseView.Store](/engine/6000.6/script-reference/unityeditor/search/ipropertydatabaseview/store.md), [IPropertyDatabaseView.TryLoad](/engine/6000.6/script-reference/unityeditor/search/ipropertydatabaseview/tryload.md) and [IPropertyDatabaseView.Invalidate](/engine/6000.6/script-reference/unityeditor/search/ipropertydatabaseview/invalidate.md).
