I’m creating a Commander class that is representative of the players connection to the host. I want to also add a Unit player object to the connection that will be the physical representation of the player. I can’t figure out how this is supposed to be done. It looks like I should be able to add the Unit with NetworkServer.AddPlayerForConnection() but there’s always an error with the playerControllerId. e.g. I can’t seem to just: conn.playerControllers.Add() or pass conn.playerControllers.Count.
I believe I need the Unit to be a player object because I need the NetworkIidentity.IsLocalPlayer true so NetworkTransform works.
Anyone know how to do this? or the way it should be done?