Search Unity

Multiplayer issues with Synchvar

Discussion in 'Multiplayer' started by Tsequier, Apr 20, 2016.

  1. Tsequier

    Tsequier

    Joined:
    Apr 20, 2016
    Posts:
    23
    Hello everyone !
    I'm trying to do a multiplayer game where your player can climb into a turret and shoot from it. I made the multiplayer part with 2 player, but here is the problem : when my client climb a turret, he calls a [Command] so the transform of the turret gun (which is a child of the turret object) is given to him but it doesn't work !
    The console says that my variable isn't set.

    - When the client who has the server does it it works
    - My variable is noted as a Synchvar

    if you need more details just ask.

    Thanks for your help !
     
  2. ben-maurin

    ben-maurin

    Joined:
    Apr 7, 2016
    Posts:
    47
    You cannot pass Transform through Command. Only simple type as int, vector, float.. and networkId.