Navigation
API > API/Plugins > API/Plugins/Harmonix
Description
Given a pointer to a valid struct member, walk the PropertyChain given the PropertyChangedChainEvent constructing an FString representing the property chain.
For example: FBaz { int Number = 4; }
FBar
{
TArray
UMyObject { FBar MyBar;
virtual void PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedChainEvent) override { FString PropertyChangedString = Harmonix::GetStructPropertyChainString(&MyBar, PropertyChangedChainEvent); } }
if MyBar.BazArray[3].Number was changed from 4 to 6 for example, then the resulting string will be
- "MyBar.BazArray[3].Number = 6"
ensures that the FProperty at the head of the PropertyChain is the same type as the struct passed in
| Name | Harmonix::GetStructPropertyChainString |
| Type | function |
| Header File | /Engine/Plugins/Runtime/Harmonix/Source/Harmonix/Public/Harmonix/PropertyUtility.h |
| Include Path | #include "Harmonix/PropertyUtility.h" |
namespace Harmonix
{
template<typename TStructType>
FString Harmonix::GetStructPropertyChainString
(
TStructType * StructPtr,
const FPropertyChangedChainEvent & PropertyChangedChainEvent
)
}
Parameters
| Name | Remarks |
|---|---|
| StructPtr | Src Data ptr of type TStructType |
| PropertyChangedChainEvent | Property chain that should correspond to the Struct type passed in. The Tail of the property chain should be a copiable value type. |