Problem with OnPhotonCustomRoomPropertiesChanged

I'm trying to use OnPhotonCustomRoomPropertiesChanged (), in several ways I've seen in several different references, however I always get the same error, the console says I have a parameter, and the method needs 2, I'm lost, after searching a lot I solved ask for help here. If anyone can help me, thank you in advance.

Error:
Failed to call function OnPhotonCustomRoomPropertiesChanged of class GerenciadorPartida
Calling function OnPhotonCustomRoomPropertiesChanged with 1 parameter but the function requires 2.

Comments

  • Hi @AndreGomes,

    can you confirm that you have the correct method signature in the mentioned class? The function should be void OnPhotonCustomRoomPropertiesChanged(Hashtable propertiesThatChanged).
  • Hi @Christian_Simon.
    Ty for the help, but this problem i already solved, I did some crap using hashtable. now i have other problem. My sound does not execute in network. i already trued various methods via RPC. but nothing works. i currently put AudioPlayOneShot in one RPC.

  • Would you like to share some more details what exactly isn't working? I think you can send the name of the AudioClip you want to play and invoke the PlayOneShot function from the PunRPC function.
  • For example, I have 2 players, one shoots and the other should listen to the sound of the shot, but they only hear sounds of objects in the scene, but when it is another player that shoots, it does not make the sound of the gun. I put the same RPC that makes the impact sound on the subject of the scene to try to do this.
  • I think this isn't a problem with PUN if you can confirm that the RPCs (shooting the gun) are received by all clients in the room. So please check if the RPC calls are correctly processed. From this [PunRPC] marked function you can also invoke the PlayOneShot function. Please also check if you only use PlayOneShot and not the Play function. I'm not sure, what happens if you are mixing up both functions. If you can't get this working, please share some code snippets of the related functions.
Sign In or Register to comment.