Page 1 of 1

Unity Doesn't connecting to server

Posted: 28 Jul 2023, 11:55
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.

Re: Unity Doesn't connecting to server

Posted: 28 Jul 2023, 14:29
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.

Re: Unity Doesn't connecting to server

Posted: 28 Jul 2023, 17:59
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

Re: Unity Doesn't connecting to server

Posted: 29 Jul 2023, 07:32
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