Unet, Multiplayer, Network

I want to find a way to spawn several player objects. So one player have for instance two player objects.
So at first to make this possible i had to find a way to spawn player objects after connecting to the server.
2254320--150662--upload_2015-8-17_11-49-38.png
In the offline scene you can choose if you want to start as Client, a server or a host. Then you come to the game Scene (Little map). In this Scene is a empty gameObject with the “SpawnScript” atteached. This Script should spawn the player object.
My Problem is, after spawning the player I get the Error “A connection has already been set as ready. There can only be one.UnityEngine.Networking.NetworkManager:Update()”. In the Scene is now one player object. (was started as a host). Now a other Client connect to it. Now there are 3 cubes and 2 Clients.
Can anybody help me or have an idea how to solve this Problem?

2254320–150663–SpawnScript.cs (594 Bytes)

sounds like your Start function is being called twice. Put some logging in it?

I put into the void Start() function a Debug.Log(Startfunction called) and i get only called once.

I honestly do not think you can create two network connections like this, What you are trying to do actually would be to connect the client to the server ready the players connection, Then you want to request the server to create what ever objects you want.

I solved my Problem :wink: it is possible that one Connection has one or more playerobjects with the authority “local Player”. To make this possible the Client have to “tell” the Server that he want to spawn a Player.

mentioned that in my above post glad you figured it out.