Hi all!
i have problem with PlayerIO. When i connect to server, then i not see other players
PlayerIOClient.PlayerIO.Connect(
"world-of-zukaro-2ucj4k7phewsufpcsff6ow", // Game id (Get your own at playerio.com. 1: Create user, 2:Goto admin pannel, 3:Create game, 4: Copy game id inside the "")
"public", // The id of the connection, as given in the settings section of the admin panel. By default, a connection with id='public' is created on all games.
userid, // The id of the user connecting. This can be any string you like. For instance, it might be "fb10239" if youґre building a Facebook app and the user connecting has id 10239
null, // If the connection identified by the connection id only accepts authenticated requests, the auth value generated based on UserId is added here
null,
delegate(Client client) {
Debug.Log("Successfully connected to Player.IO");
//Create or join the room
client.Multiplayer.CreateJoinRoom(
"Red Room", //Room id. If set to null a random roomid is used
"UnityMushrooms", //The room type started on the server
true, //Should the room be visible in the lobby?
null,
null,
delegate(Connection connection) {
Debug.Log("Joined Room.");
infomsg = "Joined Room.";
// We successfully joined a room so set up the message handler
pioconnection = connection;
pioconnection.OnMessage += handlemessage;
joinedroom = true;
GameObject newplayer = GameObject.Instantiate(PlayerPrefab) as GameObject;
},
delegate(PlayerIOError error)
{
Debug.Log("Error Joining Room: " + error.ToString());
infomsg = error.ToString();
}
);
},
delegate(PlayerIOError error) {
Debug.Log("Error connecting: " + error.ToString());
infomsg = error.ToString();
}
);