# TryGetProperty

> Retrieves the value of a specified light property.

## Definition

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

## TryGetProperty(string, float)

Retrieves the value of a specified light property.

```csharp
public bool TryGetProperty(string propertyName, out float value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Name of the property.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The retrieved value.

### Returns

| Type                                                          | Description                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the property exists on the light. Returns false otherwise. |

## TryGetProperty(string, Vector4)

Retrieves the value of a specified light property.

```csharp
public bool TryGetProperty(string propertyName, out Vector4 value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Name of the property.**** (\[Vector4]\(/engine/6000.6/script-reference/unityengine/vector4)): The retrieved value.

### Returns

| Type                                                          | Description                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the property exists on the light. Returns false otherwise. |

## TryGetProperty(string, string)

Retrieves the value of a specified light property.

```csharp
public bool TryGetProperty(string propertyName, out string value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Name of the property.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The retrieved value.

### Returns

| Type                                                          | Description                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the property exists on the light. Returns false otherwise. |

## TryGetProperty(string, int)

Retrieves the value of a specified light property.

```csharp
public bool TryGetProperty(string propertyName, out int value)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Name of the property.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The retrieved value.

### Returns

| Type                                                          | Description                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the property exists on the light. Returns false otherwise. |
