# Data storage problem on unity client side

**URL:** <https://forum.heroiclabs.com/t/data-storage-problem-on-unity-client-side/129>\
**Category:** Local Setup\
**Created:** [August 7, 2019, 3:26pm UTC](https://forum.heroiclabs.com/t/data-storage-problem-on-unity-client-side/129 "2019-08-07T15:26:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad9mm](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@brad9mm](https://forum.heroiclabs.com/u/brad9mm)\
**Post date:** [August 7, 2019, 3:26pm UTC](https://forum.heroiclabs.com/t/data-storage-problem-on-unity-client-side/129/1 "2019-08-07T15:26:54Z")

</div>

problem 1  
basically the issue is that when i join the gameplay again from lobby(main menu) list of players is not reset .

public List Players { get; private set; }  
Players = new List();

In Players we have previous stored data either we cleared it or not , on Game scene from  
GamePlay —\> lobby —\> GamePlay

Problem 2

we have two players p1 and p2  
ofcourse p1 send first req of matchmatking then p2

but match join req send first by p2 then p1

its effects the list of connected opponents or match join presence, we use that list for assigned their positin on gameplay , we make a game of 4-5 players in a room  
and turn should be shift clockwise

---

<div class="post-metadata">

**Author:** ![zyro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/zyro/32/14_2.png) [@zyro](https://forum.heroiclabs.com/u/zyro)\
**Post date:** [August 7, 2019, 7:25pm UTC](https://forum.heroiclabs.com/t/data-storage-problem-on-unity-client-side/129/2 "2019-08-07T19:25:52Z")

</div>

Please keep forum post scope narrow next time, one issue per post ideally. If you have more than one problem create one post for each.

Problem 1: I’m not sure what this list of players is, I assume it’s something you’ve created. If it’s your own data structure then you are responsible for its use - including clearing it when the player leaves the match and joins another one.

Problem 2: If I understand correctly you’re talking about the order of connected opponents in the list of presences. This is not guaranteed and if you rely on a particular order you should guarantee it yourself. For example you can sort the list by user ID so each client sees the same order, or you can send data messages between match participants to agree the order.
