Hello
I created two projects: Client and Server
On my server and client I have a “Player” prefab. This prefab has a network view on it as well as a rigidbody.
My server runs the following code:
When I click on a button:
Network.InitializeServer(10, 25000, false);
When a player disconnects and I want to remove him:
void OnPlayerDisconnected(NetworkPlayer player)
{
Network.RemoveRPCs(player);
Network.DestroyPlayerObjects(player);
}
When a player connects:
void OnPlayerConnected(NetworkPlayer player)
{
Network.Instantiate(playerPrefab, transform.position, transform.rotation, 0);
}
My question is do I have to create the same level for the player on my server as well as on my client?
My client has a simple “Plane” which he falls on when he connects, but if I dont create the same “Plane” on my server my “Player” falls through the plane on the client side.
It seems highly inconvenient to do it this way. Also is this the correct way? Im unsure about where to instantiate gameobjects (Server or client)?