Search Unity

Unity Multiplayer [PHOTON]RPC set active wont work

Discussion in 'Connected Games' started by Moddwyn16MC, Feb 28, 2017.

  1. Moddwyn16MC

    Moddwyn16MC

    Joined:
    Jan 27, 2016
    Posts:
    44
    Code (CSharp):
    1. [PunRPC]
    2. public void ShowShield (bool active){
    3.     ability.shield.SetActive (active);
    4. }
    Code (CSharp):
    1. GetComponent <PhotonView>().RPC ("ShowShield", PhotonTargets.AllBuffered, true);
    Why won't this show in the other clients? It shows in my client but not to other people. Why?
     
  2. Kamil-Says

    Kamil-Says

    Joined:
    Jun 30, 2014
    Posts:
    154
    First check if the rpc executes on other clients via debug, if not then make sure you send it with your owned view.
     
unityunity