Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetValue

Sets the value of a property by name to the given value.
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Method
  • Namespace: Unity.Properties
  • Assembly: UnityEngine.PropertiesModule

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

Sets the value of a property by name to the given value.
public static void SetValue<TContainer, TValue>(TContainer container, string name, TValue value)

Parameters

container

T
The container whose property will be set.

name

The name of the property to set.

value

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.
public static void SetValue<TContainer, TValue>(ref TContainer container, string name, TValue value)

Parameters

container

T
The container whose property will be set.

name

The name of the property to set.

value

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.
public static void SetValue<TContainer, TValue>(TContainer container, in PropertyPath path, TValue value)

Parameters

container

T
The container whose property will be set.

The path of the property to set.

value

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.
public static void SetValue<TContainer, TValue>(ref TContainer container, in PropertyPath path, TValue value)

Parameters

container

T
The container whose property will be set.

The path of the property to set.

value

T
The value to assign to the property.

Remarks

This method is NOT thread safe.