Adding Float property to blueprint asset via c++ creates integer property instead

i have a editor utility widget that creates properties for selected blueprint assets. in UE4.27 everything worked fine. in UE5.0, every property that is of type float produces an integer property instead. this also counts for array values.

i guess that is a bug that sneaked into the 5.0 build somehow. does anyone have info in that?

here is the code that i use to add the property.

FEdGraphPinType PinType;
PinType.ContainerType = EPinContainerType::None;
PinType.PinCategory = UEdGraphSchema_K2::PC_Float;
			FBlueprintEditorUtils::AddMemberVariable(BlueprintAsset, "PropertyName", PinType, "0.0");
1 Like

I had the same problem.
We solved it.

FEdGraphPinType PinType;
PinType.ContainerType = EPinContainerType::None;
PinType.PinCategory = UEdGraphSchema_K2::PC_Real;
PinType.PinSubCategory= UEdGraphSchema_K2::PC_Float;
			FBlueprintEditorUtils::AddMemberVariable(BlueprintAsset, "PropertyName", PinType, "0.0");

thanks, great :clap: :clap:

it just looks like it was not intended to be that way ^^

did you also notice similar cases for other pin types? i mean where it is also not obvious how it works