0

I have a command which exists on the player prefab which basically spawns objects on the server from the client

 [Command]
 void CmdSpawnObjectWithAuthority(GameObject spawned)
 {
     NetworkServer.SpawnWithClientAuthority(spawned , gameObject.GetComponent<NetworkIdentity>().connectionToClient);
    
     
 }

And it does spawn them, but they are spawned without client authority for some reason, although I am sure that support for client authority for non-player objects has been added since unity 5.2, I need the spawned non-player objects to have client authority as they have other commands attached to them

Thanks in advance

Edit: i am using unity 2019.2

AmirWG
  • 251
  • 1
  • 2
  • 10
  • I hope you are not really using `5.2` .. you know it is from 2015 .. at least use the last version that still had UNet .. afaik 2018.3 or even 2018.4 LTS (not sure how to understand Unity since they say UNet is not shipped **after** 2018.4) – derHugo Sep 02 '20 at 16:58
  • @derHugo Of course I am not using unity 5.2, I am using unity 2019.2 – AmirWG Sep 02 '20 at 17:18
  • @derHugo I know unet is deprecated, but it's the only option at the moment for making multiplayer games since unity's new multiplier system is not out yet – AmirWG Sep 02 '20 at 17:21
  • well there is Photon which is quite frequently used currently ;) But of course this is not related to your question just sidenotes – derHugo Sep 02 '20 at 19:35

0 Answers0