Search Unity

Third Party Mirror - List of all Online Players

Discussion in 'Multiplayer' started by AvercromXD, Jan 24, 2022.

  1. AvercromXD

    AvercromXD

    Joined:
    Dec 10, 2021
    Posts:
    1
    Hello there,

    I am trying to make a Chat for a Multiplayer Game. I want to implement a function to create a new chatroom where you can invite other players. So I need to save a List of all players that are currently online. But I don't know how to do that. Can someone help me out here?

    Thanks
     
  2. Baklusha

    Baklusha

    Joined:
    Dec 18, 2018
    Posts:
    7
    Hi!

    There is a public dictionary in a public class Mirror.NetworkServer:
    upload_2022-1-27_10-15-16.png
    You can call it from anywhere in your code and get all current connections to the server.
     
    CommandU and RubyKube like this.