Search Unity

Any object with a network Identity gets deactivated when the game starts

Discussion in 'Multiplayer' started by TrollHachem, Jun 10, 2015.

  1. TrollHachem

    TrollHachem

    Joined:
    Dec 25, 2012
    Posts:
    65
    It's all in the title , anyone else having this problem?
     
  2. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    Objects with NetworkIdentity will be deactivated on a server until they are spawned with NetworkServer.Spawn(prefab instance) or NetworkServer.SpawnObjects() for scene objects. Clients wait for the message from the server that the object was spawned to enable it. (If you are dealing with scene objects and you use NetworkManager, it should call SpawnObjects for you)
     
    TrollHachem likes this.
  3. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Except it doesn't. And even more, when I call SpawnObjects() manually scene objects are activated on host only, but not on client
     
  4. marcelop

    marcelop

    Joined:
    Oct 28, 2014
    Posts:
    3
    Any news on this issue? I'm having the same problem - SpawnObjects is not enabling my objects on the client
     
  5. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    your client is probably not connected or not ready. try increasing the log level in the network manager and looking at your logs regarding connection and readiness of clients, and then the spawn logs
     
  6. marcelop

    marcelop

    Joined:
    Oct 28, 2014
    Posts:
    3
    chrismarch likes this.