Actor component's variable is not replicated if change value function/event was triggered from another object

To reproduce:

  1. Create an actor component and attach it to your character

  2. In the Actor component class create a variable of any type and set replication to “Replicated”

  3. In the Actor component create a function or event which “sets” variable value to any different from initial

  4. In the Actor class add that Actor componetn

  5. In the Actor class bind a button to trigger the event, which is set to “Run on server” and triggers the function/event of actor component to change actor component’s variable value

  6. Start a game and press that button

  7. Observe the actor component value

Actual result: Value is changed on server, but not updated on client

102363-replbuglog.png

Hello ARG_ON,

After looking over your report, I have found that this is working as intended. The actor component needs to be set to replicate. I have provided an example below. I have also provided a link to the public tracker that has a report that was submitted for this feature to exposed to in the class defaults for actor components.

Link: Unreal Engine Issues and Bug Tracker (UE-34433)

Example:

102364-componentrephelp.png

Make it a great day