hi i’m developing web game with ur Unity3d and SmartFoxServer technology.
as u provided nice example, it’s very comfortable to understand co-operation of both server and client.
but here i have a problem with my code.
plz read debug message below:
InvalidOperationException: Hashtable.Enumerator: snapshot out of sync.
System.Collections.Hashtable+Enumerator.FailFast ()
System.Collections.Hashtable+Enumerator.MoveNext ()
LobbyGUI.SetupRoomList () (at Assets\Game\Scripts\LobbyGUI.cs:206)
LobbyGUI.Awake () (at Assets\Game\Scripts\LobbyGUI.cs:66)
this exception happens when i typed username and press submit button in login user interface.
and strangely this exception happens often, not always.
and the code LobbyGUI.cs:66 is like this:
private void SetupRoomList() {
List<string> rooms = new List<string>();
foreach ( Room room in smartFox.GetAllRooms().Values ) {
// Only show game rooms
if ( !room.IsGame()) {
continue;
}
Debug.Log("Room id: " + room.GetId() + " has name: " + room.GetName());
rooms.Add(room.GetName());
} //////////// this is line 66
roomStrings = rooms.ToArray();
}
this code is totally from example except i transported it to my own project.
i cannot understand why this exception happens and even i don’t know what “snapshot out of sync” means.
plz someone tell me how i can solve these problem.
i cannot go any further by the virtue of this bug thx…