[Solved] Unity Android UdpClient.Send Access Denied

Hi All,

I am attempting to get my Unity Android game talking over the local WiFi. When everything is running from a desktop computer all of my code works flawlessly. However, when I deploy the game to Android I keep getting an Access Denied exception when I call the below code.

UdpClientClient = new UdpClient();

Client.Send(requestData, requestData.Length, “192.168.1.255”, 3310); //Access Denied

I have the below permission in my Android Manifest.

Does anyone know what might be causing this issue?

You’re trying to send a broadcast. Try setting EnableBroadcast to true first, since it defaults to false.

1 Like

That was the issue thanks!

1 Like