Hello all, this is my first time on the forums, but I doubt it will be my last.
I recently set up an AWS EC2 Ubuntu Server running SmartFoxServer2x. I downloaded the following tutorial/example:
http://docs2x.smartfoxserver.com/Exa...bject-movement
The server appears to be functioning properly, and all necessary ports are open. The client however, appears to be trying to download scripts from my local machine here. In the C# scripts I have changed the server/connection details to match those of the server, but it still shows my local directory in the web player's developer mode console. I was hoping some one could point me in the right direction.
If you would like to see the error, simply go to http://badtrollproductions.com
In the console it displays that the policy file failed to load, as I'm sure you can imagine why. If you expand the console, it will show the local directory that the unity3d project is stored on my PC. I am extremely confused, and I am rather new to unity. I've spent quite some time on google, but yielded no results. Any help would be much appreciated. Thanks in advance!
WrX
Unity 3, webplayer security model and SFS2X policy server
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Re: Unity 3, webplayer security model and SFS2X policy serve
Remember that inspector values override the code.
So if you changed something in the code and its a public variable, then the Unity inspector value takes priority!
/Thomas
So if you changed something in the code and its a public variable, then the Unity inspector value takes priority!
/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
Re: Unity 3, webplayer security model and SFS2X policy serve
Ive been having a similar problem with the Secirity.PrefetchSocketPolicy() call, which I couldn't even get working with the Unity API examples with SFS2X running on localhost. Turns out that to develop locally you must set your Unity project settings to "Web Player". Works fine now
http://forum.unity3d.com/threads/152059 ... erPort-500)-fails
http://forum.unity3d.com/threads/152059 ... erPort-500)-fails
Re: Unity 3, webplayer security model and SFS2X policy serve
The whole point of the security policy is to protect cross domain access in web based applications.
Maybe it wasn't working for you because you were exporting to an executable. I would expect the policy api to work only in the web player.
Maybe it wasn't working for you because you were exporting to an executable. I would expect the policy api to work only in the web player.
Re: Unity 3, webplayer security model and SFS2X policy serve
Correct the crossdomain policy is only required when using the WebPlayer.
There is another option though, Unity automatically requests the policy on port 843. With the SF server, it is enabled by default (in the Flash tab), however, the server doesnt listen. So just adding the listenning port for 843 on TCP and UDP in the server configuration allows Unity to work without calling PrefetchSocketPolicy. There is one caveat to this as well, the server must be run as root on Linux.
There is another option though, Unity automatically requests the policy on port 843. With the SF server, it is enabled by default (in the Flash tab), however, the server doesnt listen. So just adding the listenning port for 843 on TCP and UDP in the server configuration allows Unity to work without calling PrefetchSocketPolicy. There is one caveat to this as well, the server must be run as root on Linux.
Re: Unity 3, webplayer security model and SFS2X policy serve
Hi,
yes you are correct. Port 843 is not bound by default and it requires root privileges under Unix/Linux.
Cheers
yes you are correct. Port 843 is not bound by default and it requires root privileges under Unix/Linux.
Cheers
Who is online
Users browsing this forum: No registered users and 29 guests