Disconnect/Reconnect

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Disconnect/Reconnect

Postby appels » 26 Oct 2010, 02:12

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.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 26 Oct 2010, 05:53

Using Unity 2.6 or 3.0?
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 26 Oct 2010, 11:09

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.
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 30 Oct 2010, 01:14

solved.... yay, didn't unsuscribe a callback.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 30 Oct 2010, 06:21

Phew :-)

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 2 guests