# TryLoadProperty

> Loads a property if any.

## Definition

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

## TryLoadProperty(ulong, string, PropertyDatabaseRecordKey, Object, string)

Loads a property if any.

```csharp
public bool TryLoadProperty(ulong documentKey, string propertyName, out PropertyDatabaseRecordKey recordKey, out object value, out string alias)
```

### Parameters

**** (\[ulong]\(https\://learn.microsoft.com/dotnet/api/system.uint64)): Document id.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Property name.**** (\[PropertyDatabaseRecordKey]\(/engine/6000.6/script-reference/unityeditor/search/propertydatabaserecordkey)): Computed property key that can be used to do other load or store accesses.**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): Decoded propety value.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Property alias if any.

### Returns

| Type                                                          | Description                            |
| ------------------------------------------------------------- | -------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the property is found. |

## TryLoadProperty(PropertyDatabaseRecordKey, Object)

Loads a property if any.

```csharp
public bool TryLoadProperty(PropertyDatabaseRecordKey recordKey, out object data)
```

### Parameters

**** (\[PropertyDatabaseRecordKey]\(/engine/6000.6/script-reference/unityeditor/search/propertydatabaserecordkey)): Computed property key that can be used to do other load or store accesses.**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): Decoded propety value.

### Returns

| Type                                                          | Description                            |
| ------------------------------------------------------------- | -------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the property is found. |
