I have a LobbyNetworkManager and a player prefab that I have dropped in the, well, “Game Player Prefab” field. Now the following error occurs: “GameObject Player is a prefab, it can’t be spawned. This will cause errors in builds.” - and indeed, the player crashes upon game start while in build.
What is the correct way to spawn a game player using LobbyNetworkManager, if not with a prefab? I am using Unity 5.6.0b6.
Removing the Network Identity (and all components depending on it) and adding it again fixed the issue for me.
I have a prefab that is instantiated in OnServerStart and spawned with NetworkServer.Spawn afterwards that was resulting in the error somehow.
Apparently, it was a bug by Unity? In Edit → Project Settings → Editor, setting the Asset Serialization Mode to “Force Text” causes Unity to rebuild the assets. After resetting to “Mixed”, the error disappeared and the build no longer crashes.
Can someone help me with this please, I can’t remove network identity because scripts rely on it and i have about 15 prefabs i need to add all are messed up. PLEASE SOMEONE HELP