Navigation
API > API/Plugins > API/Plugins/Harmonix
Description
Given pointers to valid structs walks the PropertyChain given the PropertyChangedChainEvent copying the property that was changed from the Source Struct to the Dest Struct
Assumes that the number of elements in each struct and child struct arrays are identical
For example: FBaz { int Number = 4; }
FBar
{
TArray
UMyObject { FBar MyBar; FBar MyBarProxy;
virtual void PostEditChangeChainProperty(FPropertyChangedChainEvent& PropertyChangedChainEvent) override { Harmonix::CopyStructProperty(&MyBarProxy, &MyBar, PropertyChangedChainEvent); } }
if MyBar.BazArray[3].Number was changed from 4 to 6 for example, then the PropertyChangedChainEvent would point to that property that was changed.
So the value in MyBar.BazArray[3].Number will be copied into MyBarProxy.BazArray[3].Number;
ensures that the FProperty at the head of the PropertyChain is the same type as the struct passed in
returns whether the copy was successful
- Copy can fail if types don't match the PropertyChangedChainEvent
- Copy can fail if there is a size mismatch in any child arrays contained in any of the structs
| Name | Harmonix::CopyStructProperty |
| 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>
bool Harmonix::CopyStructProperty
(
TStructType * InDest,
TStructType * InSrc,
const FPropertyChangedChainEvent & PropertyChangedChainEvent
)
}