- Home /
Question by
Inis · Jun 29, 2016 at 05:43 PM ·
c#gameobjectnetworkingnetworkcommand
Non player objects movements are not syncronized on server
Hi everyone I'am struggling with this problem from a very long time.
I have a scene object (a cube) that can be moved by the client. The problem is that its movements are not seen on server.
The cube has a network identity and network transform component. To sync its movements i'am using [command] (based on the example I found here http://docs.unity3d.com/ScriptReference/Networking.CommandAttribute.html).
I've found out that the problem is that, the statement:
if (NetworkServer.active)
is never true.
Could anyone help me please? Thank you so much
Comment
Not sure what you were trying to achieve with if (NetworkServer.active) but my guess is that should be Network.isServer.