Are replicated variables marked with UPROPERTY(Replicate), replicated to new clients on join?

If I have an int variable marked to replicate that is default = 0, and on the server it has updated to 1. When a new client joins the server, is the variable going to replicate to 1?

Or do I have to send a server RPC which will send a client RPC to get all of the variables I need replicated on join?

it will replicated as long as its ‘Relevant’

you can also use RepNotify which creates a function for callbacks, ie you can put a printstring in there to test that it has replicated

1 Like

Thank you for the info!!! That worked. I set the AActor variable bAlwaysRelevant to true in the constructor to test and the variable replicated as expected.

This link has more info as well: Actor Relevancy and Priority | Unreal Engine 4.27 Documentation | Epic Developer Community