Why would you do this in the first place? Why not creating the variable in your c++ class? I can’t think of a single use case where you want to declare variables in the Blueprint and access these BP variables from c++ code. I’m confused.
I’m new to both C++ and Blueprint. The graph for the VehicleBlueprint ([file][1]) that is hard to comprehend. So I figured I could just create an actor class and modify the float variable from the code.
I’m trying to change the SpeedMultiplier variable by code.
I have made that change in the code. How do I hook the variable to the Blueprint such that any changes made to the variable in the code reflects to the Blueprint?
As you can see you can access the UClass and later you can find a UProperty* by name, with that you can access the proper pointer and then you can change the value, this is the power from unreal reflection system
In case you don’t have a name clash now by adding the same variable name in the c++ file, you should just be able to access it in Blueprints like everything else.