private void Awake() { Instance = this; DontDestroyOnLoad(gameObject); // 切换场景后也不能让他销毁掉 client = new ClientPeer(); client.Connect("127.0.0.1", 6666); }
private void Awake() { Instance = this; //连接以后不摧毁连接体,这样进入下一个场景还能保持网络连接 DontDestroyOnLoad(gameObject); client = new ClientPeer(); client.Connect("127.0.0.1", 6666); }
private void Awake() { Instance = this; DontDestroyOnLoad(gameObject); client = new ClientPeer(); client.Connect("39.98.40.96", 6666); }
private void Awake() { Instance = this; DontDestroyOnLoad(gameObject); client = new ClientPeer(); client.Connect("127.0.0.1", 8080); }