Is a good practice use to RepNotify Variables?

I usually use RepNotify variables but I’m not sure if this practice is good in terms of performance.
Using RepNotify I avoid certain problems to replicate some animmontage.

You won’t see a large performance hit from using RepNotify once or twice, but using them for all of your variables will clog up your bandwidth pretty quickly.

If you just need to track a variable over the network, standard replication will do just fine. RepNotify is used in cases where you need to execute game logic when the state of the replicated variable changes.

Think of RepNotify like the button at a crosswalk: ‘walk’ and ‘don’t walk’ are the two states of a Boolean variable (let’s call it ‘WalkSignal’). When you press the button, ‘WalkSignal’ changes from ‘don’t walk’ to ‘walk’, and OnRep_WalkSignal updates the ‘material’ (the signal) to display the ‘walk’ symbol.

In this case, RepNotify is useful because the signals on either side of the crosswalk need to change simultaneously. If you’re driving down a one-way street, on the other hand, RepNotify is unnecessary because there’s only one direction to drive, and therefore only one light to change.

Privacy & Terms