Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[4.10.4 & 4.11.P7] Inconsistent RepNotify behavior on client and server.

Hi there!

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.

https://docs.unrealengine.com/latest/INT/Resources/ContentExamples/Networking/1_4/index.html :

Oftentimes, it is desired to execute some logic in response to the value of a replicated variable changing. Variables that are marked RepNotify, have a special function called automatically any time the value is changed, on both Network Authority and Remote Machines.

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 :)


Product Version: UE 4.10
more ▼

asked Mar 14 '16 at 03:41 PM in Bug Reports

avatar image

891 36 8 37

avatar image Rudy Q ♦♦ STAFF Mar 14 '16 at 06:06 PM

Hello Marooney,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. I see that you mention testing this in 4.10.4 and 4.11 p7, does this mean that you were able to reproduce this issue in a clean project, or did you upgrade the project that you were using?

  2. If you were able to do this with a clean project, could you provide a detailed list of steps to reproduce this issue on our end?

  3. Can you provide screen shots of any blueprints that may be involved?

avatar image Marooney Mar 14 '16 at 10:57 PM

Hi, sorry i usually do better than that, so here we go:

1: Create a new blank project (i reproduced this in both 4.10.4 and 4.11.p7)

2: Create a new Actor set it replicated and drag it into the level

3: - Create a float variable and set it RepNotify

4: - Tick and OnRep as following:

Scenario 1: alt text alt text Result (every tick) (1 Player, authoritative):

 LogBlueprintUserMessages: [NewBlueprint_75] 0
 LogBlueprintUserMessages: [NewBlueprint_75] 0
 LogBlueprintUserMessages: [NewBlueprint_75] 0

Its actually on SET and not on CHANGED :) (Different to all the other clients where it gets called only once)

Scenario 2: alt text alt text Result (every tick) (1 Player, dedicated):

 LogBlueprintUserMessages: [NewBlueprint_75] Client 1: 0
 LogBlueprintUserMessages: [NewBlueprint_75] Client 1: 0
 LogBlueprintUserMessages: [NewBlueprint_75] Client 1: 0

Its not on REP (client is non authoritative) and not on CHANGED as well :)

No issue to me, i will do a custom change check if required, just wanted to point this out :)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello Marooney,

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

more ▼

answered Mar 15 '16 at 03:33 PM

avatar image

Rudy Q ♦♦ STAFF
47.4k 545 132 523

avatar image Flash7 Oct 13 '17 at 03:20 AM

There is still no change on that

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question