Photonview id issue - Cross platform problem iOS vs Android (PUN 1.v51)

Options
Hello, long time no see :).

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. It is related at the cross platform scenario.

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).

When this scenario occurs among only iOS players, or only Android player, all my logic is working very well, no glitch, tested many times. 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. 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. So it is really weird, I tried many times and this patterns always occurs. The problem is that I do not any difference in the code for iOS or Android regading this logic, so I'm confuse.

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. This is the RPC I send.
GamePhotonView.RPC("SendPhotonPlayerInfo", PhotonTargets.Others, GameManager.Manager.PlayerName);

After 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.
		
foreach (var member in this.controller.Members)
{
			if (GameManager.Manager.IsLocalPlayer(member.name)) continue;
			GamePhotonView.RPC("SendPhotonPlayerInfo", member, GameManager.Manager.PlayerName);
}
What I see in the log is always this Warning traces, a lot of time. It seems to be all the RPCs send by the iOS players, the new Android player received but fails to be parsed because of the following. And I think all those are the iOS transform position, and other RPC that they are sending like firing etc.

"Received OnSerialization for view ID 1001. We have no such PhotonView! Ignored this if you're leaving a room. State: Joined" /// <summary> /// Reads updates created by OnSerializeWrite /// </summary> private void OnSerializeRead(Hashtable data, PhotonPlayer sender, int networkTime, short correctPrefix) { // read view ID from key (byte)0: a int-array (PUN 1.17++) int viewID = (int)data[(byte)0]; PhotonView view = this.GetPhotonView(viewID); if (view == null) { Debug.LogWarning("Received OnSerialization for view ID " + viewID + ". We have no such PhotonView! Ignored this if you're leaving a room. State: " + this.State); return; }



I'll try to investigate this further, but any help would be appreciated!!! :smiley:

Cheers,
Don T.

Comments

  • vadim
    Options
    Hi,

    Please update to latest PUN version before further investigations.
    Would be nice to look at full logs from both devices.
  • dontonka
    Options
    Hello, after further investigation, it looks like my RPC IDs had changed (PhotonServerSettings) between my release of iOS and my Android version, but that's strange thought since the same RPC was working in a certain context.

    I'm really not thinking of upgrading in the moment, my current version is working very nice, tested a lot in the context of my game, and I have also some custom changes, so upgrading would means many headache for me.

    Anyway seems to be resolved now.

    Regards,
    Don T.