Last active
August 29, 2015 14:13
-
-
Save BrentFarris/91b938ae4c17dc9e5194 to your computer and use it in GitHub Desktop.
Connect to 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 string host = "127.0.0.1"; // IP address | |
public ushort port = 15937; // Port number | |
public Networking.TransportationProtocolType protocolType = Networking.TransportationProtocolType.UDP; // Communication method | |
private void Start() | |
{ | |
Networking.Connect(host, port, protocolType); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment