Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


TrySetValue<TContainer, TValue>(ref TContainer, in PropertyPath, TValue, out VisitReturnCode)

Sets the value of a property at the given path to the given value, using this converter group or the global ones.
Read time 1 minuteLast updated 11 days ago

Definition

TrySetValue<T, U>(T, PropertyPath, T, VisitReturnCode)

public bool TrySetValue<TContainer, TValue>(ref TContainer container, in PropertyPath path, TValue value, out VisitReturnCode returnCode)

Parameters

container

T
The container whose property needs to be set.

The path of the property to set.

value

T
The value to assign to the property.

returnCode

The return code of the conversion.

Returns

Type

Description

bool
true
if the value was set correctly, and
false
otherwise.

Remarks

This method isn't thread-safe.