Trying to get to grips with some networking but apparently I’ve managed to confuse myself in the process.
There’s 2 (seemingly) pretty basic things I’d like to do, and I’m hoping you can shed some insight.
Fixed this issue. Was being silly.
Return values on Commands? Are these possible? I’ve tried so far and had no luck. If not, what is the common methodology behind getting values from the server (short of syncVar…).
Its a shame, right?
but yeah you cant do that, I use ClientRpc’s so for example if i have a float that’s called “exampleValue” and want to update it on the client you could something like this:
[Command]
public void CmdRecuestNewValues(){
RpcGiveNewValues(exampleValue);
}
[ClientRpc]
public void RpcGiveNewValues(float value){
exampleValue = value;
}
then if you call the CmdRecuestNewValues(); command you will update you values.