Navigation
API > API/Plugins > API/Plugins/ToolsetRegistry > API/Plugins/ToolsetRegistry/UToolsetLibrary
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool SetObjectProperties
(
UObject* Object, |
Sets the values of specific properties in an Object. | ToolsetRegistry/ToolsetLibrary.h |
|
static bool SetObjectProperties
(
UObject* Object, |
C++-only overload that also reports which property names were successfully set. | ToolsetRegistry/ToolsetLibrary.h |
SetObjectProperties(UObject *, const FString &, EBypassContainerCheck)
Description
Sets the values of specific properties in an Object.
Partial-write semantics: writes are NOT transactional. Sibling properties whose JSON resolves cleanly are committed even when other properties (or other JSON keys within a nested struct) fail. A false return value means at least one property could not be set; it does not mean the object is unchanged. Callers that need all-or-nothing semantics should wrap the call in a transaction and roll back on failure.
Example: passing {"name": "ok", "doesNotExist": 0} into a struct returns false, raises a script error naming "doesNotExist", AND leaves "name" set to "ok". Same applies to unknown keys inside nested structs, which surface via the same error path.
| Name | SetObjectProperties |
| Type | function |
| Header File | /Engine/Plugins/Experimental/ToolsetRegistry/Source/ToolsetRegistry/Public/ToolsetRegistry/ToolsetLibrary.h |
| Include Path | #include "ToolsetRegistry/ToolsetLibrary.h" |
| Source | /Engine/Plugins/Experimental/ToolsetRegistry/Source/ToolsetRegistry/Private/ToolsetRegistry/ToolsetLibrary.cpp |
UFUNCTION (BlueprintCallable, Category="Toolset Library")
static bool SetObjectProperties
(
UObject * Object,
const FString & PropertiesJson,
EBypassContainerCheck BypassContainerCheck
)
True if every property was set successfully. False indicates at least one failure; the object may already contain partial writes from sibling properties.
Parameters
| Name | Remarks |
|---|---|
| Object | The object to modify. |
| PropertiesJson | The property names and values in a JSON formatted string. |
| BypassContainerCheck | When Yes, container-size change detection is skipped and every property emits a plain ValueSet. Only use this when you know your object can handle top-level ValueSet changes instead of expecting individual ArrayAdd/ArrayRemove/ArrayClear change events when resizing containers. |
SetObjectProperties(UObject *, const FString &, TArray< FName > &, EBypassContainerCheck)
Description
C++-only overload that also reports which property names were successfully set.
| Name | SetObjectProperties |
| Type | function |
| Header File | /Engine/Plugins/Experimental/ToolsetRegistry/Source/ToolsetRegistry/Public/ToolsetRegistry/ToolsetLibrary.h |
| Include Path | #include "ToolsetRegistry/ToolsetLibrary.h" |
| Source | /Engine/Plugins/Experimental/ToolsetRegistry/Source/ToolsetRegistry/Private/ToolsetRegistry/ToolsetLibrary.cpp |
static bool SetObjectProperties
(
UObject * Object,
const FString & PropertiesJson,
TArray < FName > & OutSetPropertyNames,
EBypassContainerCheck BypassContainerCheck
)