一个小菜汪 2023-07-03 19:26 采纳率: 47.1%
浏览 29

Unity 报错求解决

Unity运行通讯程序时候报了这个错,请问这是为什么,怎么解决呢

NotSupportedException: Could not register to wait for file descriptor 18980
System.Net.Sockets.Socket.QueueIOSelectorJob (System.Threading.SemaphoreSlim sem, System.IntPtr handle, System.IOSelectorJob job) (at <6bb3336e864c4ab48c43a2538573e586>:0)
System.Net.Sockets.Socket.BeginSendTo (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint remoteEP, System.AsyncCallback callback, System.Object state) (at <6bb3336e864c4ab48c43a2538573e586>:0)
Microsoft.Unity.VisualStudio.Editor.Messaging.Messager.SendMessage (System.Net.IPEndPoint target, Microsoft.Unity.VisualStudio.Editor.Messaging.MessageType type, System.String value) (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.18/Editor/Messaging/Messenger.cs:173)
Microsoft.Unity.VisualStudio.Editor.VisualStudioIntegration.Answer (System.Net.IPEndPoint targetEndPoint, Microsoft.Unity.VisualStudio.Editor.Messaging.MessageType answerType, System.String answerValue) (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.18/Editor/VisualStudioIntegration.cs:271)
Microsoft.Unity.VisualStudio.Editor.VisualStudioIntegration.Answer (Microsoft.Unity.VisualStudio.Editor.Messaging.Message message, Microsoft.Unity.VisualStudio.Editor.Messaging.MessageType answerType, System.String answerValue) (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.18/Editor/VisualStudioIntegration.cs:263)
Microsoft.Unity.VisualStudio.Editor.VisualStudioIntegration.ProcessIncoming (Microsoft.Unity.VisualStudio.Editor.Messaging.Message message) (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.18/Editor/VisualStudioIntegration.cs:169)
Microsoft.Unity.VisualStudio.Editor.VisualStudioIntegration.OnUpdate () (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.18/Editor/VisualStudioIntegration.cs:136)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <5030de2575e0434f93fa486a5ff56077>:0)

img

  • 写回答

2条回答 默认 最新

  • 失棉的羊 . 2023-07-03 20:11
    关注

    根据提供的错误信息:

    1. 错误消息中提到了套接字(Socket)和异步回调(AsyncCallback),这意味着可能涉及到与网络通信相关的问题。
    2. 错误消息中还提到了Unity相关的集成(Visual Studio Integration),这可能意味着问题出现在Unity的编译器集成过程中。

    要解决这个问题,可以尝试以下步骤:

    1. 检查网络连接和配置:确保网络连接正常,防火墙配置正确,没有任何网络相关的问题。
    2. 更新或重新安装Unity和相关插件:尝试更新Unity和相关插件(特别是Visual Studio Integration插件)到最新版本,并重新安装它们,以确保没有已知的问题。
    3. 检查代码错误:检查代码中是否存在可能导致此错误的问题,特别是与网络通信或套接字操作相关的代码。确保代码正确处理套接字操作,正确注册和使用异步回调函数等。
    4. 检查文件描述符(File Descriptor)相关的问题:错误消息中提到了无法注册等待文件描述符,可能是由于文件描述符资源不足或其他问题导致的。可以尝试增加操作系统的文件描述符限制,并检查代码中是否正确处理文件描述符的使用。

    如果上述步骤仍无法解决问题,建议参考Unity的官方文档、论坛或向Unity的技术支持团队寻求帮助,他们可能为您提供更具体的解决方案。

    评论

报告相同问题?

问题事件

  • 创建了问题 7月3日

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100