Hello,
Currently I am working of make switches, buttons and lights sync between clients. For most it is working fine. But for some I get:
“RPC call failed because the script couldn’t be loaded. The function was ‘ToggleSwitch’.”
Here is the code for the button/switch
function OnMouseDown ()
{ //ToggleSwitch();
networkView.RPC("ToggleSwitch", RPCMode.All);
}
@RPC
function ToggleSwitch()
{
switch (lcu_static_variables.back_text)
{
.....
}
}
I don’t understand the error because it calls somethin in the same script, thus how can the script not be loaded?
All the buttons and switches work this way.
Any ideas why it won’t work?