Hello Everyone
I’m Trying to Active/Dis-active Object and send it by RPC
but its notworking
public GameObject Light1;
public GameObject Light2;
If(ITurnItOn == True){
Light1.SetActive(true);
Light2.SetActive(true);
networkView.RPC("TheLights",RPCMode.OthersBuffered,Light1,Light2,"true");
}
else{
Light1.SetActive(false);
Light2.SetActive(false);
networkView.RPC("TheLights",RPCMode.OthersBuffered,Light1,Light2,"false");
}
[RPC]
public void TheLights(GameObject light1,GameObject light2,string Switch){
if(Switch == "true"){
light1.SetActive(true);
light2.SetActive(true);
}
else if(Switch == "false"){
light1.SetActive(false);
light2.SetActive(false);
}
}