Hi,
I have a working local multiplayer game that am adding network to. If I understood correctly (and with reference to Unite 2014 network video) I made my shooting code into a Command by adding [Command] directive, "Cmd" prefix and NetworkServer.Spawn() but I can't see any bullet when I shoot. Here is my current code:
Bullets won't work when I converted them to Commands
I have a working local multiplayer game that am adding network to. If I understood correctly (and with reference to Unite 2014 network video) I made my shooting code into a Command by adding [Command] directive, "Cmd" prefix and NetworkServer.Spawn() but I can't see any bullet when I shoot. Here is my current code:
Code (csharp):
- [Command]
- protected void CmdFireProjectile(float aimInDegrees, float timeToLiveModifier)
- {
- // TODO: Different weapons MAY need different logic of reducing...