Firefox Unity3d Error

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

Moderators: Lapo, Bax

MikkoH
Posts: 3
Joined: 25 Jan 2010, 21:12

Firefox Unity3d Error

Postby MikkoH » 25 Jan 2010, 21:18

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.
User avatar
Lapo
Site Admin
Posts: 21018
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 26 Jan 2010, 08:18

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
Lapo
--
gotoAndPlay()
...addicted to flash games
MikkoH
Posts: 3
Joined: 25 Jan 2010, 21:12

Postby MikkoH » 26 Jan 2010, 18:39

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.
MikkoH
Posts: 3
Joined: 25 Jan 2010, 21:12

Postby MikkoH » 01 Feb 2010, 14:32

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)

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 1 guest