Page 1 of 1

Firefox Unity3d Error

Posted: 25 Jan 2010, 21:18
by MikkoH
I'm having an odd problem.

For some reason the very first time I hit my game on Firefox everything runs smoothly-
I connect to the server
Join a zone
Join a room
Start sending messages

For some reason the second time I hit the application without restarting FireFox it seems that I go:
I connect to the server
Join a zone
Join a zoom
Then I get kicked out
Start getting a Warning that the "Room List is empty" (obv since I'm not connected anymore)

If I restart firefox and run again everything works smoothly.

Same issue does not happen in Safari. It's smooth sailing and I can refresh as many times as I want without restarting.

Posted: 26 Jan 2010, 08:18
by Lapo
Hi,
For some reason the second time I hit the application without restarting FireFox it seems that I go:

Does this mean that you hit the refresh button of the page?
If that's the case sounds like it's a plugin problem...
Can you provide the errors that you are getting the 2nd time, exactly?

Thanks

Posted: 26 Jan 2010, 18:39
by MikkoH
Basically this is just a demo I am building for a client.

So what I do is I send an object with the position and rotation of the player.
If someone receives that object I instantiate "another player" that is controlled by the objects received from the server.

Sooo... I have one player in game.
Then I join with Firefox into the same game where the player is.
Everything works great.

If I refresh the page or close that tab and open the game again. (basically coming in as a new player)

I get the following in the console-


Trying to call onConnectionLost, but no callback is registered
************************************************************
Warning:
The room list is empty!
The client API cannot function properly until the room list is populated.
Please consult the documentation for more infos.
************************************************************


And then it keeps on saying that warning. Basically it looks like for some reason my client disconnects from the server for some odd reason and I continue to try to send data to the server.

It's wierd too I noticed in Safari that OnApplicationQuit never gets called. So basically I have characters hanging in the server cause I can't disconnect them on app quit.

Posted: 01 Feb 2010, 14:32
by MikkoH
Looks like the OnApplicationQuit doesn't get called in Safari when you have multiple tabs with multiple Unity Players running in them. (guess that one is a Unity bug)