void Awake() { if (currentInstance != null) { Destroy(gameObject); return; } DontDestroyOnLoad(gameObject); net = GetComponent <LSNet>(); currentInstance = this; NetworkInit(); }
public void OnServerActive(LSNet net) { Debug.Log("Server active."); this.net = net; }
// Network stuff. public void OnConnected(LSNet net) { Debug.Log("Connected to server."); }