My RPC function is not called on server side when the client is on Android device
I have a RPC function:
[Rpc(RpcSources.InputAuthority, RpcTargets.StateAuthority, Channel = RpcChannel.Reliable)] public void RPC_SetPlayerNameAndTeam(string playerName, int team) { ... }
There is no problem when running the client in Unity Editor, but on an Android client, it doesn't get called.
Here is my client side code:
IEnumerator WaitTillNetworkObjectIsAvailableAndProcess() { yield return new WaitUntil(() => Object != null && Runner.IsRunning && Runner.State == NetworkRunner.States.Running && Runner.TicksExecuted >= 3); if (IsOwner) { RPC_SetPlayerNameAndTeam(PlayerName, (int)PlayerTeam); } ... }
This couroutine function is called in player.Spawned(). PlayerName parameter is a string.
Your help would be greatly appreciated!
George
0