Replace all variable references

Here’s a problem that I have faced several times.
I have one system made entirely in blueprint, or buyed one from marketplace.
And now I’m transcoding this system to C++.

In my blueprint, I had some variables like, let’s take “MyGreatVarBP” for example.
So now, I create this var in C++ with the name “MyGreatVarC”.

If I want to replace the references of this variable, I need to get some coffee and with a lot of peace in my heart go to my graph and replace one by one.
Will be awesome if we can just have a function to “Replace all references” of one variable.

Thanks!

I don’t exactly understand what you mena by “replacement”, do you want to replace BP variable with C++?

Yes, replace a BP variable with one moved to C++ and it is a huge pain.

Hm, I think I have one advice. Use local blueprint variables and change c++ variable at one time.
As I know when you change var in c++ you create a new one for blueprint (we have great tool call “Rename…” in VS but this tool doesn’t affect to BP). So that’s why blueprint can’t find your changed variables, for BP you delete old var and create new.

I did have to transcoding my blueprint code from blueprint to C++, and it is like 15+ blueprint with 40+ functions each blueprint, 30+ widget,…, but different from you, I need to replace the whole blueprint function with C++ function, so most of the time, I add a postfix “_Old” to my blueprint function and variable, thankfully by the time I need to do that Unreal engine stop crashing when I need to change function/variable name in too many place, then add and implement function and variable with same name without postfix in C++. Finally, after testing and make sure the function in C++ can return the same result as blueprint ones, I deleted my blueprint function and variable, compiled, save all then turn off the editor. The next time I open the editor, unreal will show me the place where I need to replace the function and variable, all I need is click, drag and assign suitable input. It is one fugly method, but at least it work and it worked well until now.

Hey just checking if there is any new workarounds for this. BP currently has replace references but the c++ variables don’t show up. If they did this would be super easy. Anyone know why they don’t show up there or a workaround for this?