Пример #1
0
 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");
         }
     });
 }
Пример #2
0
 void Awake()
 {
     Instance = this;
 }