What do you all think about the idea of being able to declare what function gets called when a variable is marked as RepNotify?
Right now, Unreal auto-generates an OnRep function based on the variable name, which works, but feels a bit rigid in some cases. For example, simply renaming the variable breaks the link to its OnRep function—something that can go unnoticed and lead to unexpected behavior. Also, these auto-linked OnRep functions can’t be categorized in Blueprints, which makes organizing blueprints way worse, especially in large projects.
That got me thinking—what if there was a way to assign a specific function to run on replication, directly in the variable details panel? Like a dropdown that appears when you check RepNotify, allowing you to select any function with no inputs. That way:
Renaming the variable wouldn’t break the logic.
You could point to existing functions that are already organized and categorized.
It becomes easier to reuse or centralize replication handling logic where it makes sense.
Here’s a rough idea of what I imagine:
Enable RepNotify → choose a no-input function from a dropdown → done. Clean, more robust, and more in line with how we assign functions for other events like delegates (event dispatchers).
Just something I’ve been thinking about while cleaning up my Blueprint networking logic. Curious to hear how others handle this—maybe there’s a plugin out there that already does something like this? Or maybe there’s an engine-native solution I’ve missed?
Would love to hear thoughts from other devs working heavily in Blueprints—especially anyone who’s dealt with issues stemming from renaming a rep-notify variable or is big on keeping things organized like myself.
Like expose the functionality to blueprint? Or just doing literally that in C++? I’m mainly wondering if anyone else thinks this would be helpful for blueprint users. Unfortunately while it seems i can get by with network replication in blueprint, i may have to sooner or later move to C++ more or less to get the best experience.
You’d create the variable and Onrep configuration in C++. Expose the variable to BP.
Realistically at the end of production BP’s should not have much “code” in them. 99% should be in C++ parent class and the BP class should just be a configurable variant that’s used in game play.
Look at the Character class and Character Movement Component as an example. All of its replication is handle in C++. Loads of it too.
Every dev regardless of experience at some point has to use BP’s. These are the configurable assets that are used in gameplay. At the highest level you’re writing everything in C++ and exposing to BP for end result usage. You then create a BP from the parent class and use it. You don’t ever hard code references to specific meshes, fx, sounds in C++. You reference type and expose it to BP.
thanks for your pov.
i understand that some devs have to use bps at some point, but that does not negates the fact that most of the users (if not the real target audience) of bps are designers, artists, and non programmers.
as a lead dev, too often, i have to deal with supporting colleagues that shoot themselves in the foot with too much power they don’t need, don’t want, or they get overwhelmed by it. and that makes it much harder to do my job, while also increasing the cost of the project considerably.
in fact, the majority of the devs that use bps are the ones that find cpp too complex or difficult (this is not a value judgement but just a neutral fact), usually new comers. experienced devs find cpp much faster and easy to work with, the ones i know have told me that too.
if you want flexibility and more power, there’s cpp. two tools for the same job is not a very wise strategy.
anyway, i dont disagree with you, op asked for my opinion, and this is my opinion.
As a Senior GD that’s my main point. Designers are the ones using our end product as a simple BP. All the complexity is in the parent. They shouldn’t be coding really anything. Just drag-n-drop, configure.
Networking should be handled by either the Sr GD or a dedicated network engineer. Designers, Artists etc shouldn’t be messing with anything network related.
I do agree the current onrep setup is good enough. Need more than that then work with C++.