First of all, yes, I know that RPC's are outdated but personally I like the legacy system more.
So I found a way to pass booleans through RPC easily (without int or other).
in JS you would do something like this
var myBool : boolean;
function Start(){
var nView = GetComponent.<NetworkView>();
nView.RPC("MyFunc", RPCMode.AllBuffered, myBool.ToString());
}
@RPC
function MyFunc(b : String){
if(b == true.ToString()){
//true would go here
}
else{
//false here
}...
How to: Pass booleans through RPC
So I found a way to pass booleans through RPC easily (without int or other).
in JS you would do something like this
var myBool : boolean;
function Start(){
var nView = GetComponent.<NetworkView>();
nView.RPC("MyFunc", RPCMode.AllBuffered, myBool.ToString());
}
@RPC
function MyFunc(b : String){
if(b == true.ToString()){
//true would go here
}
else{
//false here
}...
How to: Pass booleans through RPC