# TryGetValue<T>(out T)

> Retrieves the current value assigned to the port’s UI field.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.7/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

## TryGetValue\<T>(T)

```csharp
bool TryGetValue<T>(out T value)
```

### Parameters

**** (T): When successful, contains the value assigned to the port’s field.

### Returns

| Type                                                          | Description                                                                             |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the port is not connected and a field value is available; otherwise, `false`. |

### Remarks

This method is intended for editor-time inspection of an input port’s value, configured through a field displayed in the UI. If the port is connected, the field is hidden and no value is available, so the method returns `false`. If the value was never explicitly set, this method still returns `true`, and `value` will contain the default value for type `T`.
