Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Unity 5.6.1f1 TcpClient works in Preview but not in VS2017

Discussion in 'VR' started by Almypal, Jul 7, 2017.

  1. Almypal

    Almypal

    Joined:
    Jun 29, 2017
    Posts:
    20
    Hello All,

    I can use the TcpClient Class in Unity. When I preview my app, the connection to the server is established and data is passed back and forth.

    When I try to build the app for the hololens, I get build errors. One suggestion online was to comment out the TcpClient Class, build the project and then un-comment the class in VS studios. This method allowed me to build the project. However, when I un-comment the TcpClient Class in VS, the TcpClient class was not found.

    The hololens is a UWP application, will DatagramSocket's work?

    Is there a way to get the TcpClient class to work?

    I am very confused.

    Thank you
     
  2. Almypal

    Almypal

    Joined:
    Jun 29, 2017
    Posts:
    20
    Never mind, I re-wrote the code using DatagramSockets and it works.
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,745
    Yes: switch to IL2CPP scripting backend.