Reimplementing blueprint functions in C++ is a bit of a pain. I usually change the function name (i.e. “FunctionX” to “FunctionX_OLD”), implement “FunctionX” in C++, and then change every use of the old one to use the new one.
The process is critical when going from prototype to optimized but it also becomes a factor when C++ code ends up needing to access an existing blueprint-defined function. It’s also worth noting that since 4.18, I have gotten corrupted packages after performing this process. No one can pin it down but it’s real so I always back up before doing this kind of conversion. It manifests as a mismatch in the look-up tables that the engine uses to map RPC functions.
It would be nice if there was an easier way to do it. And I think automating the process would be straight-forward for someone who knows that aspect of the engine intimately.
It might be pretty easy to use nativization: convert the function to native code, change all the references, and delete the blueprint function. Let us finegle the generated code into something better for people to work with. It’d be easier than it is now.
Automatically moving variables to C++ would be even easier. Can’t tell you how many times I’ve had to move a variable into C++.