# SetValue

> Sets the value of a property by name to the given value.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Properties](/engine/6000.7/script-reference/unity/properties.md)
* **Assembly:** UnityEngine.PropertiesModule

## SetValue\<T, U>(T, string, T)

Sets the value of a property by name to the given value.

```csharp
public static void SetValue<TContainer, TValue>(TContainer container, string name, TValue value)
```

### Parameters

**** (T): The container whose property will be set.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property to set.**** (T): The value to assign to the property.

### Remarks

This method is NOT thread safe.

## SetValue\<T, U>(T, string, T)

Sets the value of a property by name to the given value.

```csharp
public static void SetValue<TContainer, TValue>(ref TContainer container, string name, TValue value)
```

### Parameters

**** (T): The container whose property will be set.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property to set.**** (T): The value to assign to the property.

### Remarks

This method is NOT thread safe.

## SetValue\<T, U>(T, PropertyPath, T)

Sets the value of a property at the given path to the given value.

```csharp
public static void SetValue<TContainer, TValue>(TContainer container, in PropertyPath path, TValue value)
```

### Parameters

**** (T): The container whose property will be set.**** (\[PropertyPath]\(/engine/6000.7/script-reference/unity/properties/propertypath)): The path of the property to set.**** (T): The value to assign to the property.

### Remarks

This method is NOT thread safe.

## SetValue\<T, U>(T, PropertyPath, T)

Sets the value of a property at the given path to the given value.

```csharp
public static void SetValue<TContainer, TValue>(ref TContainer container, in PropertyPath path, TValue value)
```

### Parameters

**** (T): The container whose property will be set.**** (\[PropertyPath]\(/engine/6000.7/script-reference/unity/properties/propertypath)): The path of the property to set.**** (T): The value to assign to the property.

### Remarks

This method is NOT thread safe.
