I'm receiving this error:
- Code: Select all
InvalidOperationException: Collection was modified; enumeration operation may not execute.
System.Collections.Generic.List`1+Enumerator[PlayerIOClient.Message].VerifyState ()
System.Collections.Generic.List`1+Enumerator[PlayerIOClient.Message].MoveNext ()
It occurs in Unity in what looks like the ForEach loop that processes messages.
- Code: Select all
foreach(PlayerIOClient.Message m in msgList)
It is not consistent and happens probably around 10% of the time. The code is the same as in the Mushrooms unity example. The game is still in development and using a development server. I haven't noticed any particular pattern or reaction to a specific message that is being received. Is it because a message was received while other messages were being processed?
-J