- Home /
NetworkManager - PlayerPrefab required?
I'm creating an RTS-style game, so I don't have a single "player" object, but if you don't set up the PlayerPrefab object on the NetworkManager in the new networking system, it complains. Is there a fix for this? Should I ignore it? Or should I create a placeholder or something that represents the player?
Am I going about this wrong?
Answer by Oniromancer · Nov 02, 2015 at 01:56 PM
yes, you need to have a prefab that stores the info of the player, even if there is no mesh associated with it. (i.e. it can be an empty). Your prefab needs a NetworkID component and you should add a script where you store the variables associated with the player. then, you spawn the units in the server and give player authority through code (that how I do it, anyways)
Answer by _spacemonkey_ · Dec 23, 2017 at 05:28 PM
In NetworkManager go to "Spawn Info" and turn off "Auto Create Player". Now it won't complain about a PlayerPrefab.
Your answer
Follow this Question
Related Questions
Collision issue on the client side using UNET 0 Answers
Vuforia multiplayer marker 0 Answers
Multiplayer ball not syncing properly using mirror. 0 Answers
Do i need to turn on unity multiplayer in order to properly use Photon PUN 2? 0 Answers
When the game starts, how can I instantiate a ball onto a random client? 0 Answers