I've just tried the exact same thing (except the UDP part) on the vanilla example.
Login, chat a few lines with the other one (got it running in editor + standalone), click logout and either quit (in standalong) or press play to stop (in editor). Unity 3 f5 on Mac.
Not a single crash on disconnect.
Get this in the editor log - so nice and clean shutdown. What is different in your setup? (BTW you arent using UDP in the lobby example as everything there runs without extension)
Code: Select all
[SFS DEBUG] <<< Packet Complete >>>
(Filename: /Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 2535)
[SFS - INFO] Message: Logout { Message id: 2 }
{ Dump: }
(utf_string) zn: SimpleChat
[SFS DEBUG] Message: Logout { Message id: 2 }
{ Dump: }
(utf_string) zn: SimpleChat
(Filename: /Applications/buildAgent/work/68355d6e5d19d587/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 2535)
OnLogout
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
LobbyGUI:OnLogout(BaseEvent) (at Assets/Game/Scripts/LobbyGUI.cs:122)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
LobbyGUI:FixedUpdate() (at Assets/Game/Scripts/LobbyGUI.cs:71)
(Filename: Assets/Game/Scripts/LobbyGUI.cs Line: 122)