Unable to read blueprint created variable through FFloatProperty

Hi All,

Converting project Unreal engine version 4.27 to 5.2 not able to read variable value.

Code In Use:

In UE_4.27

when I use this code I received correct value.

UFloatProperty* FloatProperty = FindField(Object.GetClass(), ParameterName)

but when we converted this to UE_5.2
Following code not working

FFloatProperty* FloatProperty = FindFProperty(Object.GetClass(), ParameterName)

I can able read only parent class of blueprint actor variable. and not able read blueprint class created variable.

Let me know anyone face this same problem.

Thanks & Regards,
Jegatheesh Thanumoorthy

Test if this works when you try to find it after “famous” 0.2 seconds. :smiley:

Load order in BP with C++ is mess in 5.x.
I constantly have problems with blueprints wiping out (Setting to BP defaults) variables initialized in C++, just because they do begin play after C++.

So your case may be similar, you trying to find that variable before blueprints created it.

Use FindPropertyByName + CastField

Hi All,
Found solution. Instead of using
‘FFloatProperty’ to ‘FDoubleProperty’ its worked.

Actually I created float variable in the blueprint actor, but somehow I retrieved
as double property in the c++ end. I found this through the ‘TFieldIterator’ and iterate all the type of the variable in the class.

Thanks & Regards,
Jegatheesh Thanumoorthy

1 Like