Noble Connect
Add relays, punchthrough, and automatic port-forwarding to any networking system.
README

Adds relays and punchthrough to UNet. Guarantees your players can connect while reducing latency and saving you money by connecting players directly whenever possible. Your players won't need to worry about forwarding ports or fiddling with router settings, they can just sit back, relax, and enjoy your beautiful game.

Supports Windows, Linux, OSX, Android, and iOS.

Note: Web builds are not supported.

FAQ - API - Dashboard

Features

Ease of use: Just drop it in and go. If you're already using UNet your code will barely change, as little as a single line. Let us worry about the back end while you make your game as great as it can be!

Free to start: Noble Connect is free to download and use for testing and development.

Competitive pricing: By including punchthrough and port-forwarding with our relays we are able to reduce bandwidth costs, allowing us to pass the savings on to you. Use Unity's own cost calculator to see just how much money you'll save.

Direct connect whenever possible: Why waste your hard earned money using bandwidth on the relay servers if you don't have to? A direct connection means less lag and a better player experience.

Guaranteed connection: Thanks to the Noble Connect Relays your players will always be able to host and connect, even when behind a very strict router or on a mobile network.

Powered by proven technology: Noble Connect implements ICE, TURN, and STUN. Technologies that are utilized extensively by Fortune 500 companies for voip and other real-world applications requiring real-time data transfer.

Automatic and manual region selection: We have servers worldwide to maintain the lowest ping possible. By default the best geographic region is selected automatically based on proximity. You can also manually choose which region to use.

Load balancing: We also automatically balance the load between all relay servers in a region so your players are guaranteed the smoothest experience possible.

Professional Support: We have a consistent 5 star record of prompt and effective support. Contact us via email, forums, or Discord any time and we will work with you to resolve any issue.

How to Use

In order to use the Noble Connect relay and punchthrough services you will need to sign up for an account on our website. It is free to sign up but your CCU and bandwidth will be limited. In order to raise the limits you will either need to purchase the Starter Plan or one of the monthly plans.

Step 1 - Set up

  1. Import the plugin in to your project in the Unity Editor.
  2. When the Setup window comes up, either enter your email address to sign up, or enter your Game ID if you already have an account.
    • You can get your Game ID any time from the Dashboard.
  3. Click "Activate" to activate your account.
  4. That's it, you're ready to go.

Step 2 - Test it

  1. Add the "Noble Connect/Examples/Network Manager/Network Manager Example.unity" scene to the build settings.
  2. Build for your desired platform and run it.
  3. Click "Host" in the build.
    • Note the IP and port that are displayed, this is the address that clients will use to connect to the host.
  4. Run the Network Manager Example scene in the editor.
  5. Click "Client" and then enter the ip and port from the host.
  6. Click "Connect" to connect to the host.
    • When the connection is complete you will see the connection type displayed on the client.
  7. Take a break. You earned it.

What next?

You can use the provided NobleNetworkManager on its own or as the base class for your own NetworkManager. If you prefer something a little lower level you can also use the NobleServer and NobleClient classes directly to Listen and Connect. If you're using UNet then most things will work exactly the same as you are used to.

Note: For most methods that you override in NobleNetworkManager you will want to make sure to call the base method to avoid causing unexpected behaviour.

Differences from UNet

The main difference is that you will use the NobleNetworkManager instead of the Unity NetworkManager, and the NobleServer and NobleClient instead of the Unity NetworkServer and NetworkClient. Another difference is that the host will not know the address that clients should connect to until it has been assigned by the Noble Connect servers. You can override the OnServerPrepared method to know when this has happened and to get the hostAddress and hostPort (collectively known as the HostEndPoint) that clients should use to connect to the host. This is generally when you would create a match if you're using some sort of matchmaking system. You can also get the HostEndPoint address any time after it has been assigned via the HostEndPoint property.

Regions

The region that Noble Connect uses is determined by the relayServerAddress on the NobleConnectSettings object. The default address is connect.noblewhale.com, which will automatically select the closest server based on geographic region. If you would like to connect to a specific region you can use one of the following urls:

  • us-east.connect.noblewhale.com - Eastern United States
  • us-west.connect.noblewhale.com - Western United States
  • eu.connect.noblewhale.com - Europe
  • ap.connect.noblewhale.com - Asia-Pacific
  • sa.connect.noblewhale.com - South Africa

How it Works

Punchthrough and relays work according to the ICE, TURN, and STUN specifications. Automatic port forwarding is accomplished using Open.NAT. Both upnp and nat pmp are supported.