Search Unity

should I network instantiate everything?

Discussion in 'Multiplayer' started by huw, Jun 24, 2010.

  1. huw

    huw

    Joined:
    Jun 5, 2010
    Posts:
    18
    I generally use network.instantiate to spawn players/enemies over the network, but some scenes I just have objects placed with networkviews.

    I keep getting 'random' errors with these ready-placed objects, 80% of the time they'll work, but the rest I'll get "could not find blah blah strange behaviour may occur" and the games go out of sync.

    They documentation wasn't too clear about it.. am I supposed to network.instantiate everything or is this a bug? Or is it required I manually assign networkViews in placed scene objects?
     
  2. huw

    huw

    Joined:
    Jun 5, 2010
    Posts:
    18
    After programming and testing for a number of days, I've come to the conclusion that yes, you do need to network.instantiate() ALL network views. (or manually assign them yourself)

    Having an unmanaged networkview in a level at load time gives you a random chance of failure receiving the first message depending on which computer is done loading first. This is regardless of if you disable/renable isMessageQueueRunning inbetween loading.