Question about Commands

Hi,

I have a Command in which I call another function call. Should the 2nd function call be a Command as well? I’m asking because it is not getting called on the clients but only on the host.

I have a command to make a bullet that instantiates and calls a regular method to initialize that bullet. On the host, both of these gets called but on the client only the Command gets called.

Thanks

Commands are functions that should be called by client code, to be run on the server. CmdFoo() should be called by clients, the body of CmdFoo() { //code } is run on the server. Functions called within the command are run on the server, except ClientRPCs, which are the exact opposite effect.

I generally command the server to rpc the clients, the clients can’t rpc afaik.

http://docs.unity3d.com/Manual/UNetActions.html