Last active
August 29, 2015 14:13
-
-
Save BrentFarris/dea83f9b5e60b9a2d8e1 to your computer and use it in GitHub Desktop.
Host a Server With Forge Networking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using BeardedManStudios.Network; | |
public class StartServer : MonoBehaviour | |
{ | |
public ushort port = 15937; // Port number | |
public Networking.TransportationProtocolType protocolType = Networking.TransportationProtocolType.UDP; // Communication method | |
public int playerCount = 31; // Maximum player count -- excluding this server | |
private void Start() | |
{ | |
Networking.Host(port, protocolType, playerCount); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment