RepNotify from c++ confusion.

You can’t expect to just code the game normally and expect it to work in Multiplayer…

You get more control in C++. I dislike the fact that BP automatically calls the RepNotify function tbh. If you want to call it in C++, just call the function normally…



if (Role == ROLE_Authority)
{
    MyVariable = 5;
    OnRep_MyVariable();
}


Easy. You shouldn’t be changing replicated variables in too many places anyway, it’ll make netcode issues a nightmare to track down otherwise.

1 Like