I create an actor and set it’s Net Dormancy property to “Initial”. Then I add a replicated variable and setup a timer to modify that variable (only from server).
Then I throw the actor in map and play in editor. The actor still replicates.
I also tried setting dormancy to “Dormant all” from code and “Dormant Partial” (overriding GetNetDormancy method in C++ also). The actor still replicates no matter what.
I also tried by checking and unchecking (in every possible combination) the Always Relevant, Only Relevant to Owner, etc. options.
Also tried spawning the actor and setting dormancy by code at runtime. The actor still always replicates.
Here is the test actor blueprint graph and settings:
We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.
I’m seeing this behavior in UE4.26. This is weird!
I have a blueprint set to replicate, Dormant Initial or Dormant All. Then in Tick event, if Authority, Do Once after 5 seconds Delay node I call a NetMulticast RPC and a RepNotify variable Set.
Both get replicated to the client. No Flushing or changing of Dormancy value. I thought maybe it was the RPC that flushes automatically, but even if I remove the RPC and only variable set, it still occurs.
This is a brand new UE4.26 third person project. I just slapped down a cube and added a blueprint to it.
The Bugtracker looks like it says “Won’t Fix”. So is it a bug or intentional? where the heck is the documentation on this!
Once again I cannot edit my post. The forums are really unreliable lately.
It looks like Dormancy works in UE5 Preview 2 now. Im comparing side by side same blueprint in UE4.26 and UE5 Preview 2 and its very different behaviour between the two. Im surprised, 4.26 is 2020…
And it looks like my assumption was true, RPCs will trigger a flush of dormancy. But what’s peculiar is that if you set Dormancy Initial, even with a RPC, the property change will not trigger RepNotify. If you set Dormancy All, it will trigger the property change when an RPC is fired. I can’t tell if that’s intentional or not but it’s really bizarre to me.
I’m not seeing any difference in UE5 Preview 2. I have an actor with its net dormancy set to Initial and a rep notify variable. If I change the variable on the server, the rep notify is still called. I don’t have a multicast RPC in sight. So I would double check your code as the behaviour appears to be exactly the same for me.
I don’t know if this behaviour is intentional or a bug they just can’t/won’t fix. I wish the bug tracker provided more details other than just “won’t fix.” The only solution to get around this is to move your actor to C++ as apparently is works correctly there. I haven’t gone that far yet as it hasn’t become a major issue for me yet.
is the variable changed on the same frame as you spawn the actor? I have delays on the change server side so its assured that the change is only done after the client has received it (hence initial dormancy). If you change the variable on the same frame it is spawned, then it will receive regardless of dormancy
No. This is on an actor that has been placed in the world in the editor and set to Initial. Then when I hit play with two clients, I have one of them “interact” with this actor that causes the variable to change.