/** * Scans for changes to the value * * @param bRecacheNewValues If true, recaches new values found * @return true if any changes were found */ bool ScanForChanges( bool bRecacheNewValues ) { FPropertyNode& PropertyNodeRef = *PropertyNode.Pin(); UProperty* Property = PropertyNodeRef.GetProperty(); bool bPropertyValid = true; bool bChanged = false; UArrayProperty* OuterArrayProperty = Cast<UArrayProperty>( Property->GetOuter() ); if ( OuterArrayProperty != NULL ) { // make sure we're not trying to compare against an element that doesn't exist if ( PropertyNodeRef.GetArrayIndex() >= FScriptArrayHelper::Num( PropertyValueBaseAddress ) ) { bPropertyValid = false; } } if( bPropertyValid ) { bChanged = !Property->Identical( PropertyValueAddress, Data.GetData() ); if( bRecacheNewValues ) { CacheValue(); } } return bChanged; }
void ZKMORHP_BooleanControl::Initialize() { // cache the value CacheValue(); }