1

I have a problem with Unity Unet. I am trying to spawn a player on the map. The player appears on the server and on the client, but I have the following error :

Found no receiver for incoming [xxxxxx] on playerPrefab, the server and the client should have the same NetworkBehaviour instances.

Do you know how to solve this problem?

EDIT :

Here are pictures of NetworkManager settings and PlayerPrefab settings

enter image description here enter image description here

iAmoric
  • 1,787
  • 3
  • 31
  • 64

1 Answers1

0

You need to set the player prefab in the Network Manager since it is trying to auto create it and you didn't specify one.

Image

Grelak
  • 36
  • 2
  • Yes I know it. It is empty because I get it dynamically with the character the player has chosen – iAmoric Mar 16 '17 at 14:59
  • if you want the client to be able to select the prefab you must do it by network messages, take a look at this [link](https://forum.unity3d.com/threads/how-to-set-individual-playerprefab-form-client-in-the-networkmanger.348337/#post-2256378) – Grelak Mar 16 '17 at 15:15