Networking - Variable Replicating - Android, iOS

Hi everyone, I’m so done.
I have the following setup:
Unreal Engine 4.19 with arcore Branch, Android Samsung Galaxy S7 and iPhone SE.

What I want: Create a session on one phone, join the session with the other and set a variable on the server side. I want to see that the variable changed on the client side too.

What I’m actually doing (After a lot of searching on stackoverflow etc.):
I have three blueprints for doing this called: MainMenu (Widget), MyGameInstance (GameInstance) and MyGameState (GameState). In my MainMenu I have simple buttons which are calling methods from MyGameInstance to create and join a session, that is working pretty well. Also in the MainMenu I have a button which calls a method from MyGameState which is setting a simple replicating boolean variable. If I press this button it’s only updating on server side, not on client side.

I will let you see my blueprints here:




Question: Why are you multicasting the bool? You can just set it to be Replicated and set it on the Server side, and it will replicate to all the clients.

I mean multicast should work too but it doesn’t seem necessary unless you want to force the effect to occur immediately instead of a few frames later when the replication cycle includes it.

I wonder if because you’re toggling the value to be whatever it isn’t, then maybe it’s getting toggled on the client side, and then the server is flipping it back when the variable replicates?

Try passing the bool from the server THROUGH the multicast event to the clients (it can take input params) and use that value on the NOT node instead of the client’s version of the bool.
At least we’ll find out if my theory is correct.