Component Replication does not work?

Hej UE4 community.

I’m using ue4 now for some month and got to a point where I got stuck.I want to replicate an actors component. I’ve tried to break the problem down to the simpelest situation I could imagine.

I got an component called “TestComponent” that has an Integer variable called “Integer” that should replicate with notification. I added this component to an actor in the scene. The integer can be increased by a call of TestComponent.IncreaseInteger(). The increaseInteger method is called in the Level Blueprint that calls it every second on the authority.

I’ve visually debugged it (and got a print in the OnRep_Integer) and the changes just happen on the authority… Does anyone know what could be wrong? I would really appreciate any helpful comment or answer.


Thanks in advance


The name of the component is “Inventory” and it is an actor component. As soon as the player picks an item up (server side) which triggers the inventory.addItem method that calls (depending on the size of the item) several Set Array Elem to update the datastructure of the inventory (all server side).

The inventory is just an array of actor references that get updated (null = no item).

Not immediatly but indirect. The player keeps track of interactable actors in his range. If he wishes to interact with an object he tells the server. in case of an item thats a trigger for an Player.ReceiveItem and thats where the inventory gets changed. Everything happens entirely on the server except the interaction wish in the beginning. I get an output so the function is called but only the server calls the OnRep function

Is the actor replicated? What are the replication settings for the actor?

Yes the actor it is on (Log) is also replicating :frowning:
(I added it to only one log thats the reason the component is not listed below components if you wonder)

Problem is gone now in 4.8. Seems it was a Bug in the early ue4 component days.