Unity 3 / SmartFoxServer

I cannot get any of our projects to connect to SmartFoxServer in the web player build mode. They work fine in standalone mode. I even loaded the SFSIslandDemo project and tested it with a local installation of SmartFoxServer with the same problems.

you near granted forgot to setup the policy server etc as such hell will freeze and it will none the less not allow any socket connection to it :wink:

see the corresponding page in the manual on the security in the webplayer 3.0

Hey dreamora,
I’ve already been down this rabbit hole for hours on end the night of the big release. I created the crossdomain.xml file. I set the url in the editor for the “WWW Security Emulation settings”. I tried running the web player from our server and in the editor. Is there some other setting I am missing? Are there code changes needed? Have you managed to have success in running an application that connects to SmartFoxServer using Unity 3 RC1? Any help would be greatly appreciated as this is costing our company money! After reading another post, I am lead to believe this is a bug. :roll:

same here, created the crossdomain.xml and changed the setting in the editor but i can’t connect.
i’m testing this on my local machine with a webserver.

I managed to prefetch my crossdomain.xml and in the logs i can see that but then the editor or the webplayer hangs. I sent it in as a bug Case 374771

the problem is the crossdomain stuff might not work cause you don’t talk to a webserver but the SFS server so SFS has to offer a policy functionality too

but given that flash has always been in there reach, I would expect that it has such features and that you only need to dublicate them for unitys expected port.

yes but my problem isn’t with smartfox. i’m connecting to another socket server.

then that socket server has to offer a policy validation service.

wherever you connect it has to validate the policy or unity will not talk to it

hmm, thats a problem indeed.

not so much you should be able to do so.

the docs tell you how it has to validate and the policy validating has been standard outside of unity for half a decade, Flash and SilverLight require it too when they want to access outside their own domain. (the port unity uses, if I remember right, is actually the silverlight policy one)

SOLVED. Well that was harder than needed to be. SmartFoxServer has a built-in policy server. All I had to do was run the policy server that came with Unity 3 and everything works fine. Of course I had to install it as a service on our production machines. I sure wish the documentation was a little more clear on how simple this is to set up. :wink:

cool thing :slight_smile:

I would guess the SFS one could do it too but you need to switch it to the right port cause SFS likely is flash targeted and flash uses a totally different port.

in the smartfox config set AutoSendPolicyFile to false and add :
myPolicy.xml
and put your myPolicy.xml in the server dir.
works for me in the editor but the player still crashes

the lack of policy shouldn’t make it crash.

did you check the player log?
webplayers for example upon crash will leave it behind so you can check it at any time after a crash

i found this :

did you serialize it into supported data?

otherwise that will not work, there is no such thing as Transform or anything but the basic datatypes for SFS unless that changed very recently (past 3 months)

sorry, i edited my previous post

same thing happens with the smartfox island demo, just tested it.

which means that the binding code needs to be updated for u3 to not violate the new security rules

and it works in the editor due to less security rules ?