What I see in the log is always this Warning traces, a lot of time. GamePhotonView.RPC("SendPhotonPlayerInfo", member, ) GamePhotonView.RPC("SendPhotonPlayerInfo", PhotonTargets.Others, ) Īfter that a little bit of time (1 sec.) in order to try to get around this problem, I tried to send an RPC to all the players manually, but that doesn't work either.įoreach (var member in ) When the new player that jumped into the game is about the spawn on the battlefield, I send a RPC to all others players to requesting them to create a replica on the local player, and it seems this RPC is only getting to the same operating system players. The problem is that I do not any difference in the code for iOS or Android regading this logic, so I'm confuse. So it is really weird, I tried many times and this patterns always occurs. And if let say an Android player jump in while players playing are combined already, the new Android player will only be able to see the Android player that was in the match, not the iOS players. On the other hand, when an Android player jump in while iOS players are playing (or vice versa), the Android player is not seeing the iOS players, but the iOS players can see him. When this scenario occurs among only iOS players, or only Android player, all my logic is working very well, no glitch, tested many times. When a new player join a room and a match is already on going, I load the level on the new player device and he jump right away into the game (into the battlefield, my game is an FPS). It is related at the cross platform scenario. I released my game on iOS last year ( Natural Born Soldier), and now launching on Android, but I just found out an issue which I'm not fully understanding, might be at PUN level. Void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) PhotonNetwork.RPC(photonView, "ChangeColor", PhotonTargets.MasterClient, false, null) tell the masterclient to change the color. Public class ColorChanger : Photon.MonoBehaviour How should each work, and how should this be implemented? If I only serialized the values, only the masterClient's changes proliferated. If I only used an RPC to all players the colors didn't sync up. I have heard that you should either use an rpc or OnPhotonSerializedView() however, I had to use both to get my color changes to proliferate across all players. I have some code where I change color based on a raycast calling LookedAt().
0 Comments
Leave a Reply. |