void Start() { Instance = this; Debug.Log("IS RUNNING!"); connect((bool connected) => { if (connected) { Debug.Log("Connection Stablished"); networkStream = tcpClient.GetStream(); //byte[] myWriteBuffer = Encoding.ASCII.GetBytes(id.ToString()); //Send Client id //networkStream.Write(myWriteBuffer, 0, myWriteBuffer.Length); running = true; } else { Debug.LogError("Conection couldn't be stablished"); } }); }
void Awake() { Instance = this; }