Search Unity

Third Party [Photon] Method that runs on the server

Discussion in 'Multiplayer' started by MatheusMarkies, May 16, 2021.

  1. MatheusMarkies

    MatheusMarkies

    Joined:
    Apr 16, 2017
    Posts:
    67
    I need to create a system to choose a random player, that is, a function that runs on the server and not on the client side.
    Basically I need to select a random player and send that player to customers (so they will know which player was chosen)
    It's running inside a room
    I tried to use the masterClient with RPC, but the results were not good.
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,072
    There always is a master client. It can be used to select a random player.