I've Problem since 2 Days i work again with PIO. Everything is very cool but my Problem when im Join the Game.
And Serverside im try to send my Client a Message, that im successfully Joined. The Client wont receive it.
Serverside:
- Code: Select all
Message msg = Message.Create("Join", player.ConnectUserId.Remove(0, 6));
foreach (Player p in Players)
{
p.Send("Join", player.ConnectUserId.Remove(0, 6));
}
When i send the Message like an half Second later, the client will receive it.
And on The Client, the first thing i do is link the Message Handler to reduce the time until i can successfully receive Messages.
- Code: Select all
client.Multiplayer.CreateJoinRoom("BaseMap", "BaseMap", false, null, null, delegate (Connection Connection) {
Debug.Log("Success");
Connection.AddOnMessage(handleMessage);
SceneManager.LoadScene(2);
});
Is their anyway i can fix this. Without add a Waittime on the First until i can Send the Joined Message.
I hope anyone know how i can fix this.
Thanks in advance.
Edit:
After some Tests it works sometimes. HowTo Reproduce it:
I found out when login with the Same Account within 5 Minutes 2 Times u didnt get the Login Message.
After a DevServer Crash u get again for 1 Player the Login Message.
When More then 1 Player login in at the Same Time it wont work.
And if u dont declare the DisconnectHandler it also wont work.
Can anyone please tell me if it works by him.? Or how i get fixed this Bug?
//Edit2: In The Live Cluster it works on a Chance of around 90%.