Hey, i have overridden GetLifetimeReplicatedProps() in my C++ superclass, and now when i set some variable (that i have introduced in BP child class) to replicate - it doesn’t. (server event won’t replicate the value to clients, even though that variable is set to “Replicated”)
I suspect it is because i have touched GetLifetimeReplicatedProps() in C++, and the new variable from BP is not mentioned in that function’s DOREPLIFETIME() list:
How should i do about that? is there a way to add my BP variable to GetLifetimeReplicatedProps() macros list?
For clarification sake, if i run the same event in BP on a variable that were introduced to GetLifetimeReplicatedProps() in C++, it does replicate. so the problem is not in the way i call events i guess.
The point is the replication of blueprint variables is implemented in C++ by the engine, most probably in the UObject implementation of GetLifetimeReplicatedProps. So long as you make the above call in your C++ derived class, any blueprints deriving from it should replicate their properties properly.