Launch a server.
The number of allowed incoming connections/number of players allowed in the game.
The port number we want to listen to.
Sets the password for the server. This must be matched in the NetworkConnect action.
Sets the NAT punchthrough functionality.
Use Security Layer
Unity handles the network layer by providing secure connections if you wish to use them. Most games will want to use secure connections. However, they add up to 15 bytes per packet and take time to compute so you may wish to limit usage to deployed games only.
Run In Background
Run the server in the background, even if it doesn't have focus.
Event to send in case of an error creating the server.
Store the error string in a variable.