# TryGetVariable

## TryGetVariable<T>(string, out T)

public bool TryGetVariable<T>(string name, out T value) ;

### Description

Get the value of the root Blackboard variable.

### Type Parameters

Type Parameter Name | Description | Type Constraints
--- | --- | ---
T | Variable type |

### Parameters

Parameter Name | Description
--- | ---
name | Variable name
value | Variable value

### Returns

Return true if you want to get the variable. Otherwise, return false.

## TryGetVariable<T>(long, out T)

public bool TryGetVariable<T>(long id, out T value) ;

### Description

Get the value of the root Blackboard variable.

### Type Parameters

Type Parameter Name | Description | Type Constraints
--- | --- | ---
T | Variable type |

### Parameters

Parameter Name | Description
--- | ---
id | Variable ID
value | Variable value

### Returns

Return true if you want to get the variable. Otherwise, return false.