Was using 2020.30f1 without issues. Windows 10, latest VS.
Switched to 2020.3.3f1 and now getting the error:
Unable to use UDP port 56670 for VS/Unity messaging.
You should check if another process is already bound to this port or if your firewall settings are compatible.
The exact port number changes when relaunched. This occurs with a new game, a game that was upgraded, and old games not on 2020.3.3f1.
Debugging in VS no longer works as will not synch up.
How eliminate the error and get VS debugging operational?
This solution is “dirty” as it will be overwritten with updates. Handle with care.
Ok, so with the Info of my Comment above: You can change the port Unity is using in case of a conflict.
In Visualstudio open the “VisualStudioIntegration.cs” Script. (Just click on the warning in Unity). Change in line 123 (might change in other releases) the Port number like i did. Restart VS and Unity.
Unity then uses a higher port number which (hopefully) doesn’t conflict with another.
Ok, I tried this, with version 2020.3.20f1, in my file the port number was 56000, changed it to 56500, saved it, and ran it and … it changed back. Quit Unity Editor, changed it again, reloaded, it changed back.
So it didn’t work - I guess.
Except here is the wierd thing. The error message “Unable to use UDP port 56214 for VS/Unity messaging” went away. So maybe it did work in some strange inscurtable way?
I don’t know. This behavior is flaky but it is probably some flaky Windows-Unity Interaction.
Here is something interesting… I was dealing with this issue today and was almost done (typing up a big this stinks message) I am on 2021.2.12f1/Windows 10 (full patches) and VS 2019/2022 I kept getting this error even after setting all the firewalls and monitoring it with TCPView (systernals) and could not find any reason why this wasn’t working… I reinstalled VS and the unity tools… then I went to my window/package manager and uninstalled the visual studio editor package and noticed that the visual studio code editor package was also installed… removed both reinstalled just the visual studio editor and like magic the message is now gone.
I had both VMware and VirtualBox, and uninstalling both of them solved both the unable to use UDP port for vs/unity messaging and the unable to join player connection multicast group issues.