Separate prefab for server, local player, remote players

How would you go about spawning separate prefabs for a player on the local client, remote clients, and the server with UNET?

Thanks!

easiest thing is to just have a generic player object that’s spawned for each player, and then from there you can spawn their actual objects as different prefabs. you can then have the server assign authority of those objects over to the respective players via https://docs.unity3d.com/ScriptReference/Networking.NetworkIdentity.AssignClientAuthority.html

if you really want the actual player objects to be different, you’re going to want to uncheck autoCreatePlayer in the NetworkManager inspector. Then you can probably do something like this code example - https://docs.unity3d.com/ScriptReference/Networking.NetworkServer.AddPlayerForConnection.html … in my experience hijacking the default behaviour of networkmanager is super thorny. i can’t imagine it being as easy as this, but maybe :smile:

edit: if your players are functionally basically the same, but say they just have a different model or something, you could just devise a mechanism for having the player prefab switch out their model when a syncvar “characterType” is set on the server.