UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PropertyPathHelpers Namespace Reference

Classes

struct  FInternalArrayOperationResolver
 
struct  FInternalStringGetterResolver
 
struct  FInternalStringSetterResolver
 

Functions

void FindFieldNameAndArrayIndex (int32 InCount, const TCHAR *InString, int32 &OutCount, const TCHAR **OutPropertyName, int32 &OutArrayIndex)
 
bool GetPropertyValueAsString (UObject *InContainer, const FString &InPropertyPath, FString &OutValue, uint32 PPF_Flags)
 
bool GetPropertyValueAsString (UObject *InContainer, const FString &InPropertyPath, FString &OutValue, FProperty *&OutProperty, uint32 PPF_Flags)
 
bool GetPropertyValueAsString (void *InContainer, UStruct *InStruct, const FString &InPropertyPath, FString &OutValue, uint32 PPF_Flags)
 
bool GetPropertyValueAsString (void *InContainer, UStruct *InStruct, const FString &InPropertyPath, FString &OutValue, FProperty *&OutProperty, uint32 PPF_Flags)
 
bool GetPropertyValueAsString (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, FString &OutValue, uint32 PPF_Flags)
 
bool GetPropertyValueAsString (void *InContainer, UStruct *InStruct, const FCachedPropertyPath &InPropertyPath, FString &OutValue, uint32 PPF_Flags)
 
bool SetPropertyValueFromString (UObject *InContainer, const FString &InPropertyPath, const FString &InValue, uint32 PPF_Flags)
 
bool SetPropertyValueFromString (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, const FString &InValue, uint32 PPF_Flags)
 
bool SetPropertyValueFromString (void *InContainer, UStruct *InStruct, const FString &InPropertyPath, const FString &InValue, uint32 PPF_Flags)
 
bool SetPropertyValueFromString (void *InContainer, UStruct *InStruct, const FCachedPropertyPath &InPropertyPath, const FString &InValue, uint32 PPF_Flags)
 
bool SetPropertyValue (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, const UScriptStruct *InScriptStruct, const uint8 *InValue)
 
bool SetPropertyValue (UObject *InContainer, const FString &InPropertyPath, const UScriptStruct *InScriptStruct, const uint8 *InValue)
 
bool CopyPropertyValue (UObject *InContainer, const FCachedPropertyPath &InDestPropertyPath, const FCachedPropertyPath &InSrcPropertyPath)
 
bool CopyPropertyValueFast (UObject *InContainer, const FCachedPropertyPath &InDestPropertyPath, const FCachedPropertyPath &InSrcPropertyPath)
 
bool PerformArrayOperation (UObject *InContainer, const FString &InPropertyPath, TFunctionRef< bool(FScriptArrayHelper &, int32)> InOperation)
 
bool PerformArrayOperation (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, TFunctionRef< bool(FScriptArrayHelper &, int32)> InOperation)
 

Detailed Description

A collection of utility functions operating on cached property paths

Function Documentation

◆ CopyPropertyValue()

PROPERTYPATH_API bool PropertyPathHelpers::CopyPropertyValue ( UObject InContainer,
const FCachedPropertyPath InDestPropertyPath,
const FCachedPropertyPath InSrcPropertyPath 
)

Copy values between two property paths in the same container.

Parameters
InContainerThe container object to resolve the property path against
InDestPropertyPathThe property path to copy to
InSrcPropertyPathThe property path to copy from
Returns
true if the copy was successful

◆ CopyPropertyValueFast()

PROPERTYPATH_API bool PropertyPathHelpers::CopyPropertyValueFast ( UObject InContainer,
const FCachedPropertyPath InDestPropertyPath,
const FCachedPropertyPath InSrcPropertyPath 
)

Copy values between two property paths in the same container. Fast, unsafe version. Using this requires that the two paths are pre-resolved from either a previous call to CopyPropertyValue (or GetPropertyValue/SetPropertyValue) or FCachedPropertyPath::Resolve().

Parameters
InContainerThe container object to resolve the property path against
InDestPropertyPathThe property path to copy to
InSrcPropertyPathThe property path to copy from
Returns
true if the copy was successful

◆ FindFieldNameAndArrayIndex()

PROPERTYPATH_API void PropertyPathHelpers::FindFieldNameAndArrayIndex ( int32  InCount,
const TCHAR InString,
int32 OutCount,
const TCHAR **  OutPropertyName,
int32 OutArrayIndex 
)

Parses a property path segment name of the form PropertyName[OptionalArrayIndex]

Parameters
InCountThe length of the input string
InStringThe Input string to parse
OutCountThe length of the resulting property name string
OutPropertyNameThe string storing the name of the property
OutArrayIndexThe resulting array index, if any

◆ GetPropertyValueAsString() [1/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( UObject InContainer,
const FCachedPropertyPath InPropertyPath,
FString &  OutValue,
uint32  PPF_Flags = PPF_None 
)

Get the value represented by this property path as a string

Parameters
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
OutValueThe string to write the properties value to
Returns
true if the property value was successfully copied

◆ GetPropertyValueAsString() [2/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( UObject InContainer,
const FString &  InPropertyPath,
FString &  OutValue,
FProperty *&  OutProperty,
uint32  PPF_Flags = PPF_None 
)

Get the value represented by this property path as a string

Parameters
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
OutValueThe string to write the properties value to
OutPropertyThe leaf property that the path resolved to
Returns
true if the property value was successfully copied

◆ GetPropertyValueAsString() [3/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( UObject InContainer,
const FString &  InPropertyPath,
FString &  OutValue,
uint32  PPF_Flags = PPF_None 
)

Get the value represented by this property path as a string

Parameters
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
OutValueThe string to write the properties value to
Returns
true if the property value was successfully copied

◆ GetPropertyValueAsString() [4/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( void InContainer,
UStruct InStruct,
const FCachedPropertyPath InPropertyPath,
FString &  OutValue,
uint32  PPF_Flags = PPF_None 
)

Get the value represented by this property path as a string

Parameters
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path
OutValueThe string to write the properties value to
Returns
true if the property value was successfully copied

◆ GetPropertyValueAsString() [5/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( void InContainer,
UStruct InStruct,
const FString &  InPropertyPath,
FString &  OutValue,
FProperty *&  OutProperty,
uint32  PPF_Flags = PPF_None 
)

Get the value represented by this property path as a string

Parameters
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path string
OutValueThe string to write the properties value to
OutPropertyThe leaf property that the path resolved to
Returns
true if the property value was successfully copied

◆ GetPropertyValueAsString() [6/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( void InContainer,
UStruct InStruct,
const FString &  InPropertyPath,
FString &  OutValue,
uint32  PPF_Flags = PPF_None 
)

Get the value represented by this property path as a string

Parameters
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path string
OutValueThe string to write the properties value to
Returns
true if the property value was successfully copied

◆ PerformArrayOperation() [1/2]

PROPERTYPATH_API bool PropertyPathHelpers::PerformArrayOperation ( UObject InContainer,
const FCachedPropertyPath InPropertyPath,
TFunctionRef< bool(FScriptArrayHelper &, int32)>  InOperation 
)

Perform the specified operation on the array referenced by the property path

Parameters
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
InOperationThe operation to perform. The function will receive a script array helper and an index (if the path specified one).
Returns
true if the operation was successful

◆ PerformArrayOperation() [2/2]

PROPERTYPATH_API bool PropertyPathHelpers::PerformArrayOperation ( UObject InContainer,
const FString &  InPropertyPath,
TFunctionRef< bool(FScriptArrayHelper &, int32)>  InOperation 
)

Perform the specified operation on the array referenced by the property path

Parameters
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
InOperationThe operation to perform. The function will receive a script array helper and an index (if the path specified one).
Returns
true if the operation was successful

◆ SetPropertyValue() [1/2]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValue ( UObject InContainer,
const FCachedPropertyPath InPropertyPath,
const UScriptStruct InScriptStruct,
const uint8 InValue 
)

Set the value and the leaf property represented by this property path If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path. This has safety implications depending on the form of the path, so paths that are resolved over object boundaries or dynamic arrays will always use the slow path for safety.

Parameters
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
InScriptStructThe struct type to set
InValueA pointer to the desired value for the given struct type
Returns
true if the property value was successfully copied

◆ SetPropertyValue() [2/2]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValue ( UObject InContainer,
const FString &  InPropertyPath,
const UScriptStruct InScriptStruct,
const uint8 InValue 
)

Set the value and the leaf property represented by this property path If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path. This has safety implications depending on the form of the path, so paths that are resolved over object boundaries or dynamic arrays will always use the slow path for safety.

Parameters
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
InScriptStructThe struct type to set
InValueA pointer to the desired value for the given struct type
Returns
true if the property value was successfully copied

◆ SetPropertyValueFromString() [1/4]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValueFromString ( UObject InContainer,
const FCachedPropertyPath InPropertyPath,
const FString &  InValue,
uint32  PPF_Flags = PPF_None 
)

Set the value represented by this property path from a string

Parameters
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
InValueThe string to read the properties value from
Returns
true if the property value was successfully copied

◆ SetPropertyValueFromString() [2/4]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValueFromString ( UObject InContainer,
const FString &  InPropertyPath,
const FString &  InValue,
uint32  PPF_Flags = PPF_None 
)

Set the value represented by this property path from a string

Parameters
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
InValueThe string to read the properties value from
Returns
true if the property value was successfully copied

◆ SetPropertyValueFromString() [3/4]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValueFromString ( void InContainer,
UStruct InStruct,
const FCachedPropertyPath InPropertyPath,
const FString &  InValue,
uint32  PPF_Flags = PPF_None 
)

Set the value represented by this property path from a string

Parameters
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path
InValueThe string to read the properties value from
Returns
true if the property value was successfully copied

◆ SetPropertyValueFromString() [4/4]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValueFromString ( void InContainer,
UStruct InStruct,
const FString &  InPropertyPath,
const FString &  InValue,
uint32  PPF_Flags = PPF_None 
)

Set the value represented by this property path from a string

Parameters
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path string
InValueThe string to read the properties value from
Returns
true if the property value was successfully copied