Page 1 of 1

Disconnect/Reconnect

Posted: 26 Oct 2010, 02:12
by appels
Hi,

I have a small problem when i try to reconnect to the server without reloading the webplayer.
I call all this to make sure the client is disconnected :

Code: Select all

UnsubscribeEvents();
smartFoxClient.Logout();
smartFoxClient.Disconnect();
SmartFoxStatics.Connection = null;
Login.connectionAttempt = false;
Application.LoadLevel("Login");


I can reconnect and all works fine till i re-enter my 'pre-game room', I can see on the server that i joined the room but all my code in the OnJoinRoom callback isn't fired.
Even debug messages arent fired.
Anyone got an idea what could be happening.
In the debug i see i get my roomlist, thats the last message i get and then it stops.

Eddy.

Posted: 26 Oct 2010, 05:53
by ThomasLund
Using Unity 2.6 or 3.0?

Posted: 26 Oct 2010, 11:09
by appels
3.0
I did some more tests, when i quit my game in the pre-game room when my avatars havent spawned yet, it works.
It's only when i spawned my players and i quit and reconnect that it happens.

Eddy.

Posted: 30 Oct 2010, 01:14
by appels
solved.... yay, didn't unsuscribe a callback.

Posted: 30 Oct 2010, 06:21
by ThomasLund
Phew :-)