Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.17f1
Issue ID
UUM-44192
Regression
No
UDP socket created In [InitializeOnLoad] won't cleanup after switching to Playmode
in a [InitializeOnLoad] static method I created a UDP socket, After Swithing to PlayMode ,this method will be trigger again;But this time it will report that the Port is In use ,So the second time will fail. My Tool works fine in Untiy2017,but won't work in Unity2021.3.17.
Why Untiy doesn't clean up all resource(here I mean sockets) I created in EditMode like it used to in 2017 version?
I guess it was because the Assembly reload problem ,So I tried to close my socket in AssemblyReloadEvents.beforeAssemblyReload event', sometimes it works, but after switching back and forth between editmode and play mode,the socket port just won't release ,So I can't start my socket any more. there is nothing I can do but restart Unity.FYI,I change to use different ports ,still the same result ,so I don't think it was my port number conflicting with other tools
Note: Testing was not done due to the issue not being reproducible by CQA
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Quest] Pitch Shifter causes audio degradation on Quest 2 devices when sped up
- "GUI Error: Invalid GUILayout" and "NullReferenceException" are thrown when adding Scenes to "Scenes in Baking Set" in Adaptive Probe Volumes
- Inspector window not updating when switching GameObjects in Play Mode while having a VR headset connected
- "UnityException: GetName can only be called from the main thread." erors are thrown when the Shortcuts window is opened and entering Play Mode with a shortcut
- [Android] Light2D visuals stacking over frames when using RenderGraph
Resolution Note:
Thank you for reporting a bug to Unity.
We have reviewed the issue carefully, and in this case, the team is unable to prioritize fixing this bug. There are a number of reasons we make this decision, including the impact and severity of the issue across our user and customer base, and the possibility that future plans may solve the problem in a different way, or that a workaround for the bug may be available.
Today we will be closing this case. Thank you again for taking the time to report this issue, and please let us know if there is anything else that changes the impact or severity of this issue.