- Home /
TCP client constructor error in Universal Windows Platform build
I tried to build my Unity project on Universal Windows Platform for PC and I get the following error: The error is: "Value does not fall within the expected range", in the line: "TcpClient = new TcpClient(ip, port);".
The projects works even with this error, except that the TCP client isn't connecting to the server.
I am working on Unity 2019.3.5f1, and this error occurs only when I am running the Universal Windows Platform build.
In the editor or in other types of builds it works fine.
sssaaaa.png
(138.1 kB)
Comment
What are the values for "ip" and "port"? Consider that "port" range is 1(or 0, I don't remember now)-65535, and some of them could be reserved to some system services; also the system firewall could be an issue too if it's blocking some/all ports.