- Home /
UNet Multiple Characters
Hello!
I've been trying to get a multiplayer system with different characters setup. Basically, I want the player to choose what character to play, and then it will be spawned to start playing.
I thought of two ways to go about this:
Make a scene where all the players connect and choose their characters, and once ready they all switch to the actual play scene where the correct character us spawn. I think for this I will need a custom NetworkManager (although I am not sure and would gladly appreciate some resources on how to go about that).
Make one scene, and the NetworkManager doesn't spawn a player but instead a separate script takes care of the whole player ready + character, and then spawns the correct character. (All of this without the Network Manager).
I don't know which way is the best and would love your opinion. I tried doing #2 but for some reason I am getting the error AssignClientAuthority for Player PLAYER_2 (UnityEngine.GameObject) owner cannot be null. Use RemoveClientAuthority() instead.
(This seems to be called from Line 28 of my script)
Here's my current code
I have absolutely no idea if it's the right way of going about it. But I hope you guys could help on which way is the best, and how I could go about it. (You don't need to make a whole script for me btw)
Thanks!
Your answer
Follow this Question
Related Questions
Unity networking tutorial? 6 Answers
Multiplayer| Attaching camera to player (if i am the owner 1 Answer
Changing to online sceen in multiplayer 0 Answers
[Multiplayer]How to individualize the Player 1 Answer
Network - Character Controls 1 Answer