Search Unity

TcpClient not working when build it IL2CPP

Discussion in 'Multiplayer' started by almaz85, Jul 25, 2019.

  1. almaz85

    almaz85

    Joined:
    May 12, 2019
    Posts:
    2
    Hi all, I've made a multiplayer game, and all this while I've been building it using mono. My connection by using TcpClient on the client app to connect TcpListener and accept the socket into a Socket. The game has been running for a while with many players, nothing goes wrong. However, with Play Store requirement of 64 bit apk, I'm forced to build the app using IL2CPP. Once I build with it, my game cannot connect to server. I've tried a few settings on changing the .NET version for Player Setting, in some setting connection is established but no data can be sent. When force quit the game server still able to detect the socket is close. While on some setting the connection cannot be established at all. The server TcpListener doesn't even get a request from the client. Does anyone face the same problem before? Thanks a lot! Unity version 2018.4.4f1. (Note: It's working well when run on Unity before build, everything works well. And build with mono also without any problem. Built with IL2CPP has no error, app able to run, no crash, only server cannot receive data or connection request.)
     
    UBossTheKing likes this.
  2. UBossTheKing

    UBossTheKing

    Joined:
    Feb 14, 2019
    Posts:
    4
    Hi could you tell me how you solved this problem, as I am also experiencing it.
     
    BilalAsadi likes this.
  3. mholmes

    mholmes

    Joined:
    Dec 8, 2012
    Posts:
    414
    Same issue here
     
  4. Temseii

    Temseii

    Joined:
    Aug 23, 2016
    Posts:
    14
    Seems to still be the case. Anything new on this?

    Edit: nevermind, the issue was caused by external plugins and not Unity. My bad!
     
    Last edited: Mar 14, 2022
  5. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Report it to Unity so it can get fixed :)