asadm / playroom-unity

9 stars 1 forks source link

Mock Mode: Dont create new player on each .MyPlayer() call #15

Closed asadm closed 10 months ago

asadm commented 10 months ago

https://github.com/asadm/playroom-unity/blob/c0c11be750c9ef1d988cf4b1d7f5fae765354825/Assets/PlayroomKit/PlayroomKit.cs#L129C34-L129C34

Reason: I want to be able to do this in my code:

PlayroomKit.Player myPlayer = PlayroomKit.MyPlayer();
int myIndex =playerList.IndexOf(myPlayer);

If the player is new each time, I cannot do this.

SaadBazaz commented 10 months ago

@momintlh Maintain mock player in Players array.