Search Unity

Spawn object for specific client only

Discussion in 'Multiplayer' started by gsus725, Sep 6, 2017.

  1. gsus725

    gsus725

    Joined:
    Aug 23, 2010
    Posts:
    250
    NetworkServer.Spawn indicates that it will spawn the object on all clients, but I want to spawn objects for specific clients as they come into range of the object on the server. How do I tell an object to spawn on a specific client? Thank you.
     
  2. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    That might be a great job for Observers. But to answer your question. TargetRPC's are the way to do it.