TrySetValue
Tries to set the value of a property at the given path to the given value.
Read time 2 minutesLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Properties
- Assembly: UnityEngine.PropertiesModule
TrySetValue<T, U>(T, string, T)
Tries to set the value of a property at the given path to the given value.
public static bool TrySetValue<TContainer, TValue>(TContainer container, string name, TValue value)
Parameters
The name of the property to set.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
This method is NOT thread safe.
TrySetValue<T, U>(T, string, T)
Tries to set the value of a property at the given path to the given value.
public static bool TrySetValue<TContainer, TValue>(ref TContainer container, string name, TValue value)
Parameters
The name of the property to set.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
This method is NOT thread safe.
TrySetValue<T, U>(T, PropertyPath, T)
Tries to set the value of a property at the given path to the given value.
public static bool TrySetValue<TContainer, TValue>(TContainer container, in PropertyPath path, TValue value)
Parameters
The path of the property to set.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
This method is NOT thread safe.
TrySetValue<T, U>(T, PropertyPath, T)
Tries to set the value of a property at the given path to the given value.
public static bool TrySetValue<TContainer, TValue>(ref TContainer container, in PropertyPath path, TValue value)
Parameters
The path of the property to set.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
This method is NOT thread safe.
TrySetValue<T, U>(T, PropertyPath, T, VisitReturnCode)
Tries to set the value of a property at the given path to the given value.
public static bool TrySetValue<TContainer, TValue>(ref TContainer container, in PropertyPath path, TValue value, out VisitReturnCode returnCode)
Parameters
The path of the property to set.
When this method returns, contains the return code.
Returns
Type | Description |
|---|---|
| bool | |
Remarks
This method is NOT thread safe.