Hello community,
I am trying to just set up a local server on one machine and have it able to connect to any other machine in the world via internet connection. I am still researching but I have seen options for using Unity Multiplayer servers or Photon Cloud servers but I cannot use a third party host and need to do so directly on my own computer. This can be done by hard coding the ip address for now if that makes it easier. Can anybody help me out with this?
I know it isn’t exactly the easiest thing based on vague description but all I need is to get two players in a scene at the same time with minimal interaction. It will need to work with VR but I should be able to set that part up myself once I understand how to host my own server and can connect to it from anywhere.
Any help is appreciated,
Thank you.
For the absolute basics you’re asking for, I wouldn’t use Unity Multiplayer service or Photon Cloud. I’d just go through the steps of pretty much any UNET tutorial where you connect a client to a host either on the same computer or on two different computers on the same local network, using the developer HUD controls.
Then all you do is go to your router and forward the port your host will be waiting for connections on, and you can use the same client outside your network by providing your router’s public IP address. Steps to do the last part will depend on the router you have.
You’re just doing any tutorial walkthrough and adding on port forwarding steps that are actually unrelated to Unity itself, just regular network setup stuff.
Due to my circumstances I am not able to port forward, but I had some other issues that were stopping me from connecting and I have resolved them. Thank you for your help.
@Mistafyed You may want to take a look at my NAT Traversal plug, which will perform punchthrough and port forwarding for you automatically so you will be able to connect without the relay servers most of the time. And your users won’t have to fiddle with router settings or anything lame like that.