PlayerObjectManager
public class PlayerObjectManager : MonoBehaviour
{
public NetworkEntityType playerType;
bool builtInitialPlayers = false;
bool builtServerPlayer = false;
//...
This class helps spawn PlayerNetworkEntities into the game world as they join. Also help spawn server controller player if playing that way
Methods
void Update()
Tries calling to spawn new players each Unity update
private void SpawnServerPlayer()
Build the server controlled PlayerNetworkEntity if we haven’t already and appropriate to (not all servers are players)
private void SpawnNewPlayers()
Build any new players that have joined the server recently we haven’t built already and then run them through an onboarding process. The example here picks a random spawn point to put them onto