Search Unity

Network Spawn should send the transform position/orientation

Discussion in 'Multiplayer' started by peterept, Jul 16, 2015.

  1. peterept

    peterept

    Joined:
    Dec 6, 2012
    Posts:
    22
    It seems overkill to have to add a NetworkTransform component just to get the prefab to spawn at the point given during Instantiate on the server.

    Sometimes I just spawn an object without any further movements. But I have to add a NetworkTransform (or implement my own custom NetworkBehaviour with SyncVar) to get it to have the initial position/orientation that was set during Instantiate.

    It would be useful if NetworkSpawn sent the transform once when it is spawned on clients!
     
  2. peterept2

    peterept2

    Joined:
    Aug 1, 2012
    Posts:
    41
    Actually I see it does send position but not orientation.
     
  3. Shinyclef

    Shinyclef

    Joined:
    Nov 20, 2013
    Posts:
    505
    The fewer things it sends automatically the better in my opinion. That way we don't have to consume network bandwidth if there is no use for the data being sent. Better to have the choice.