smartfoxserver 2x server close unity client error 解决sfs 断网后 unity 卡死
public static void close() { if (smartFox!=null) { smartFox.RemoveAllEventListeners(); smartFox.Disconnect(); //smartFox.GetSocketEngine().KillConnection(); smartFox.HandleClientDisconnection("kill"); print("kill"); } smartFox = null; }
1.检测你的代码有没有创建多个 smartFox 实例,因为创建一个实例,开了两个读写线程
2.检测是否重复切换相同 场景,,,,错误原因同上。。。。
3.最后退出游戏了,别忘了关闭。。。
注意:最新的dll才有这个方法 这个蛋痛的官方不给说明