UNet - Is there a way to get clients and their assigned gameobjects?
I'm in the process of learning UNet and I really love how easy it is to use, but one thing I haven't found documentation for is a function to "grab" specific players by some index and get their corresponding gameobjects.
I know there is a function called NetworkServer.ReplacePlayerForConnection(), which takes a connection associated with a gameobject and sets it to a different gameobject, but I'm looking for a way to check if a connection even has a gameobject (in case it was destroyed) and, if not, then "respawn" the player by assigning the connection to a newly created gameobject. Any help would be much appreciated!
For context, I'm working on a multiplayer 2D top-down game where players will be dying and respawning very often.
Your answer
Follow this Question
Related Questions
Designing a multiplayer lobby for LAN 1 Answer
UNET Clients Laggy 0 Answers
Using Transform Component and selfmade interface in an Network Command ? 0 Answers
Making a Networked TicTacToe Game 1 Answer