asadm / playroom-docs

https://docs.joinplayroom.com
MIT License
34 stars 9 forks source link

Feedback for “Unity (C#) API” #31

Open mrphilipjoel opened 5 months ago

mrphilipjoel commented 5 months ago

Every now and then when playing in editor, if I play two sessions back to back (stop playback, make a quick change, then play again) I get the following error:

ArgumentException: An item with the same key has already been added. Key: mockPlayer
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
GameManager.AddPlayer (Playroom.PlayroomKit+Player player) (at Assets/GameManager.cs:57)
Playroom.PlayroomKit.OnPlayerJoin (System.Action`1[T] onPlayerJoinCallback) (at Assets/PlayroomKit/PlayroomKit.cs:160)
GameManager+<>c.<Awake>b__7_0 () (at Assets/GameManager.cs:37)
Playroom.PlayroomKit.InsertCoin (System.Action callback, Playroom.PlayroomKit+InitOptions options) (at Assets/PlayroomKit/PlayroomKit.cs:75)
GameManager.Awake () (at Assets/GameManager.cs:35)
SaadBazaz commented 2 months ago

@mrphilipjoel You may want to try the latest version of PlayroomKit for Unity, this issue may have been solved there. Closing this issue. Feel free to message if it reappears.