Search Unity

Disabled networked scene objects

Discussion in 'Multiplayer' started by NachoAbril, Jan 14, 2016.

  1. NachoAbril

    NachoAbril

    Joined:
    Jun 30, 2014
    Posts:
    34
    I have a networked scene object that is disabled at the beginning. At some point during the game, I activate it. The problem is that in the client, netId is always 0 (sceneId has a correct value), so any Rpc call, syncvar... will never reach that object in client.

    If the object is enabled at the beginning, it gets a correct netId and all works well (I can disable and enable it without problems).

    This sounds like a bug, but I'm not sure if I'm loosing something here.

    Cheers,
    Nacho
     
  2. NachoAbril

    NachoAbril

    Joined:
    Jun 30, 2014
    Posts:
    34
    Well, really the scene object was enabled in the scene, but the server set it as disabled, so when the client connects, it disables the object before anything (Start function on object is not called).

    If the object was disabled from the beginning, it doesn't get a valid sceneId.