Windows Phone 8 Photonnetwork.Instantiate failing

Options
Hii,

I have found this issue in WP8 (Even found in Marco Polo tutorial WP8 export). When we instantiate players over the network ,the player (other than master client) exits from photon and OnDisconnectedFromPhoton callback is called on masterclient .I have added the code snippet for marco-polo :

public class RandomMatchmaker : Photon.MonoBehaviour
{
private PhotonView myPhotonView;
// Use this for initialization
void Start()
{
PhotonNetwork.ConnectUsingSettings("0.1");
}

void OnJoinedLobby()
{
Debug.Log("JoinRandom");
PhotonNetwork.JoinRandomRoom();
}

void OnPhotonRandomJoinFailed()
{
PhotonNetwork.CreateRoom(null);
}

void OnDisconnectedFromPhoton()
{
Debug.Log ("OnDisconnectedFromPhoton");
}

void OnJoinedRoom()
{
GameObject monster = PhotonNetwork.Instantiate("monsterprefab", Vector3.zero, Quaternion.identity, 0);
monster.GetComponent<myThirdPersonController>().isControllable = true;
myPhotonView = monster.GetComponent<PhotonView>();

}



void OnGUI()
{
GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());

if (PhotonNetwork.connectionStateDetailed == PeerState.Joined)
{
bool shoutMarco = GameLogic.playerWhoIsIt == PhotonNetwork.player.ID;

if (shoutMarco && GUILayout.Button("Marco!"))
{
myPhotonView.RPC("Marco", PhotonTargets.All);
}
if (!shoutMarco && GUILayout.Button("Polo!"))
{
myPhotonView.RPC("Polo", PhotonTargets.All);
}
}
}


}


I have tried it using 2 windows phones & one windows phone & editor. I works fine in android,windows desktop.
I am using unity4.34f1 and PUN v1.25.2 .
Regards,
Shodhan

Comments

  • Tobias
    Options
    At the moment, we have a server-side issue with the way Windows 8 Store apps send their data.
    The server-side will get a fix today, hopefully. This will stop the disconnects on Join without you changing anything on the client side.
    Despite the server fix, we will also improve the client side with the next Win 8 libraries. Those will save some bandwidth, too.
  • Shodhan
    Options
    Ya thanks alot its working now :) Please do let met know when you gonna update PUN unity sdk with client end fix for WP8.

    Regards,
    Shodhan S
  • Tobias
    Options
    Good to read it's working now.
    The update of the client is not really required but "nice to have".
    It might take a few weeks until we update PUN. We will post about it in the main PUN thread on the Unity forum and you will notice the update when you check your Asset Store "Downloads" in the Editor, too.
  • Shodhan
    Options
    Thanks a lot. I have got one more issue now...It is losing the connection after about 2 mins of game play.I have spawned
    2 multiplayer cars over the network. The movement of the cars are bit laggy after few minutes it loses the connection shows
    peercreated message.The network(wifi) is fine.I have changed the network and checked.Its the same.

    Regards,
    Shodhan S
  • Tobias
    Options
    Any entries in the log?
    If I understand correctly, you tested on another wifi already?
    Do you have another device by chance that you can test? E.g. my Xperia P does not work nicely with one of our office routers.

    To keep things simpler to find: please open another topic for this.