# SetVariable

## SetVariable<T>(string, T)

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

### Description

Sets a value for the root Blackboard variable.

### Type Parameters

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

### Parameters

Parameter Name | Description
--- | ---
name | Variable name
value | Value to set

### Returns

Returns true if the setting was successful. Otherwise, returns false.

## SetVariable<T>(long, T)

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

### Description

Sets a value for the root Blackboard variable.

### Type Parameters

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

### Parameters

Parameter Name | Description
--- | ---
id | Variable Id
value | Value to set

### Returns

Returns true if the setting was successful. Otherwise, returns false.