Connecting to my fleet / game server using Unity


I am a little confused on how I can connect a client to server. I have created a fleet which has become active. I am just wondering how I could connect to this fleet / server using a unity game? I have read the documentation including things such as needing activate game sessions and such but its all becoming quite overwhelming.

I don’t need a super complicated system. I just want a single game session that anyone who opens the build of the game is connected to. If anyone could help, I would greatly appreciate it.

Have you seen the “How Players Connect to Games documentation”?

You will need to create a Game Session which is basically an instance of your game server running with some known configuration. If a player knows the gamesession, they can then ask to connect to the game session. Describing a game session will return the ip address of the instance hosting the game session and the port its listening on for player connections. You can optionally use PlayerSessions to manage player connections but these are not required.

Briefly you need:

  1. A fleet with the right port(s) open for connections
  2. A running game session on a fleet
  3. The instance ip of the game session and its port
  4. A client that can open a connection to the server on the ip address and port

Thank you very much :slight_smile:

Since asking I was actually successful in creating a game session, I’m struggling to find c# examples of connecting to the game session though? The documentation can get confusing.

Thanks again