Unity Doesn't connecting to server

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Post Reply
arnon001
Posts: 6
Joined: 11 Jun 2022, 10:36

Unity Doesn't connecting to server

Post by arnon001 »

Hey there!,
I'm using the "Connector" example for unity, but after i build I'm getting this error: Image
the server is running on VPS, I changed the ip for the server IP, it didn't worked, changed it to the domain, still, doesn't work.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Unity Doesn't connecting to server

Post by Lapo »

Hi,
make sure to change the server address (in the Client example) from the Controller game object in Unity, rather than the source code.

Other than that you should have no problems connecting, provided that:
1- the server is running on the VPS and you can reach it
2- you don't have a firewall on your client machine blocking the communication.

For starters try pointing your browser to http:<your-server-address>:8080/, can you see the welcome page?
If so the server is up and running and reachable via the HTTP protocol.
To establish a socket connection, TCP port 9933 should also be open (on the server side).

Let us know.
Lapo
--
gotoAndPlay()
...addicted to flash games
arnon001
Posts: 6
Joined: 11 Jun 2022, 10:36

Re: Unity Doesn't connecting to server

Post by arnon001 »

Tried it all,
i'm checking the url and it working, checking the ip, and it working.
Ill send you the IP and the domain in PM
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Unity Doesn't connecting to server

Post by Lapo »

I have tested the Connector Example with the IP you have sent and it works just fine, no problems.
Did you set the server's IP address in the Controller game object as I examplained earlier?

Check the docs here:
http://docs2x.smartfoxserver.com/Exampl ... /connector
See the "Fields declaration" section.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply