Search Unity

Client is fine but host does not move, instead moves client

Discussion in 'Multiplayer' started by Nicholas1010, May 29, 2016.

  1. Nicholas1010

    Nicholas1010

    Joined:
    Aug 2, 2014
    Posts:
    20
    Hello.

    I am trying to use unet, when I run a game from Unity with build, and I run second game with Unity editor, and I host a game, and join a game with another, (does not matter if its build or editor) whichever player is the host can't move, but instead it moves another player, but client (whichever is not hosting) works fine and everything is correct there, why? Any solutions?

    I already have NetworkBehavior, UnityEngine.Networking, Network identitiy and Network Transform on player prefab, here's movement part of my script:

    http://hastebin.com/zuxawoxago.avrasm

    I am using

    Code (csharp):
    1.  
    2.         if (isLocalPlayer == false)
    3.         {
    4.             return;
    5.         }
    6.  
    in every Update function too already.

    So, once again, any idea what could be wrong?