[4.10.4 & 4.11.P7] Inconsistent RepNotify behavior on client and server.
Well it is neither a feature nor a bug, it is an inconsistent behavior of Blueprint RepNotify on client and host, that can cause unnecessary execution overhead or unexpected issues. Did not find anything about this issue in here.
So that means that OnRep only gets called if the variable is replicated by the authority. And it means that it only gets called if the value has been changed.
That works for the client of course, but the host calls OnRep every time the variable is set (not even changed). Further on as i can see when testing this issue: OnRep even gets called if the client itself sets the variable. No matter if changed as well. So you can run into a situation where the mix of Replication Event + Value Changed Event behaves completely opposite as intended.
It obviously means that the change-check is deep down the replication and not in the setter and that the OnRep call just happens when the variable is set. => You need to implement your own property setter to check for changes, before setting the rep property.
That OnRep gets called even if replication is not enabled for the blueprint, is a nice convenience feature i guess, but therefore i am sure you actually want to use it as change observer as well :)
Tested this with 4.10.4 and 4.11.P7: Actor (with/without replication) - With a float variable - Set variable every Tick (with/without authority/remote check) - In OnRep do a PrintText of the variable (with authority/remote checks)
I did not realize that since 4.8. At least i had no issues with that. I just realized it now when calling my own Property Changed Dispatcher in OnRep for calculating UI things.. To actually.. not scan the values every tick :)
Happy Debugging :)
asked Mar 14 '16 at 03:41 PM in Bug Reports
I was able to reproduce this issue on end. I have written up a report ( UE-28424) and I have submitted to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.
Make it a great day
answered Mar 15 '16 at 03:33 PM
Rudy Q ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here