Unity Pun 2获取房间娱乐活动而不加入房间
我想在我的房间列表中的每个房间旁边有一个小玩家计数,但是使用playercount.text = photonnetwork.playerlist.length.tostring();
使用PlayerCount。 不会工作,因为它会返回0,因为您还没有在房间里。
i want to have a little player count next to each room in my room list but getting the playercount using playerCount.text = PhotonNetwork.PlayerList.Length.ToString();
wouldnt work because it will return 0 since you're not in a room yet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
房间有一个游戏座位
但是,它似乎与
players
相抵触上面引用的属性(使用this.players.count
)。我希望
thisroom.playercount
能够按预期工作,即使该文档似乎否则陈述。Room has a PlayerCount property
However, it seems to conflict with the
Players
property referenced above (using this.Players.Count
).I would expect
thisRoom.PlayerCount
to work as expected, even though the documentation seems to state otherwise.