Can't Set UProperty Reflection in C++, Why?

I’m trying to change the properties of any object through the TFieldIterator …

Running my code with Begin Play I can actually print on the screen the value of some property, then change it and print property value modified … . nothing else happens to the object after the value has been changed …

I’m trying to change the intensity of a lamp … the code seems to work and when I get the properties of the lamp returns the value that has been modified over the lamp not changes in intensity … why?

void UIllusionToolkit::SetFloats(UObject* Object, FName PropertyName, float PropertyValue)
2. {
3.     UProperty* Property = Object->GetClass()->FindPropertyByName(PropertyName);
4. 
5.     if (UNumericProperty *NumericProperty = Cast<UNumericProperty>(Property))
6.     {
7.         if (UFloatProperty *FloatProperty = Cast<UFloatProperty>(NumericProperty))
8.         {
9.             void* ValuePtr = FloatProperty->ContainerPtrToValuePtr<void>(Object);
10.             FloatProperty->SetFloatingPointPropertyValue(ValuePtr, PropertyValue);
11.         }
12. 
13.     }
14. }

I think your code is not a issue here, but fact that you change property of lamp as actor which is applied only in initiation, not target light component. I seen people do that mistake without toying with reflection system