why this script doesn't work ! ?

Hello All
i am still new to photon Engine
what i am trying to do is simple

when the client press a button
print something in the Host side

the same happen when host press a button
print something in the client side
but there is nothing happen when client or host press the button
that is my code

using UnityEngine.UI;

using UnityEngine;

public class CanvasManager : Photon.PunBehaviour {
public Image mast_image , client_image;

public void btn_1()
{
if (PhotonNetwork.isMasterClient )
{
mast_image.color = Color.black;
ChatMSG();
}
else
{
client_image.color = Color.black;
ChatMSG();
}



}
[PunRPC]
void ChatMSG()
{
print("Hello MAN ");
}

}

Comments

Sign In or Register to comment.