Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Third Party How to set a fixed MasterClient, and use PhotonNetwork.Destroy() on another player.

Discussion in 'Multiplayer' started by syncro_ace, Jan 18, 2023.

  1. syncro_ace

    syncro_ace

    Joined:
    Jun 26, 2022
    Posts:
    2
    As it's stated, I've been going through videos after videos I can find regarding setting MasterClients(Which so far only found one about changing MasterClient with Pings, not what I'm looking for). What I understand so far is that, my current PC client should be the MasterClient(not set yet). And I've set the PhotonNetwork.Destory on a different, mobile Player object. I realized my mistake, and so I'm currently trying creating the functions on the PC player, then referencing prefabs player objects and destroying them. But no progress as the Prefabs cannot call the function under the Using UnityEvents for a certain component.

    I apologize if my statements seems for vague and scuffed, I'm currently working for a company while signed onto an NDA, but I've been at a loss for weeks trying to find an answer to: Destroy the MobilePlayers Player object, as well as Set the PC Client as MasterClient.

    Any form of input is appreciated, I'll reply if I have already tried them or not
    Thanks for taking the time to read!
     
  2. syncro_ace

    syncro_ace

    Joined:
    Jun 26, 2022
    Posts:
    2
    Update? as of right now, I manage to reference the GameObject globally. And can call the functions globally to delete the corresponding objects. And I might have come up with a way to just set the one Player as MasterClient, but it resets into nothing even though I only have 1 player in the game and it tells me no MasterClient. Do I have to take over the object upon hitting the hit treshold and then delete the object right after?