- Home /
Question by
agentlego · Aug 01, 2017 at 02:13 PM ·
networkingrpcfunctionscommand
Gameobject wont move through a function to a ClientRPC
hey guys ive got a networking problem, so ive got this functing that handles muzzleflash in my networked game when it calls it works like this [Command] void CmdOnShoot (GameObject Weapon) {
RpcDoShootEffect (Weapon);
}
//is called on all clients when we need to do a shoot effect
[ClientRpc]
void RpcDoShootEffect (GameObject _Weapon)
{
//do shoot effect
}
so when this is called it is suppost to do the effect on all clients, but the problem I get is when the command is called weapon is difined as the weapon you are holding, but when you get to the RPC _weapon is null any help would be appreciated thanks
Comment
Your answer
Follow this Question
Related Questions
Is there a way to create a shared variable between all the clients over network? 1 Answer
Unet [command] doesn't get called at all. 0 Answers
How do you store variables on server? 0 Answers
Can I use Rpc Calls and Commands on the same object? 0 Answers
SyncListString not changing in a Command 0 Answers