- Home /
UNet bugs all over the place, fixed after re-building the Player prefab.
I've made quite a long way to understand basics to intermediate UNet and I'm quite familiar with it.
BUT! Even with latest 5.6 build I have the same problem: At some point of my workflow, everything gets mixed up. Weird bugs, bullets not spawing, errors of all sort of types. For the three months I'm using Unet I learned to say to myself: "Ohhhhh! It is THAT time again!
And what is THAT time? It is stripping out my Player prefab from all its components and then re-adding them, so I can re-add the NetworkIdentity component. That is the one causing the problems. After that everything works wonders again!
Is anyone facing the same problem? Is it a bug on the list to be fixed? It is pretty tedious process. Are there best practices to re-assemble the Player Prefab faster, without removing and re-adding all components and scripts and references to public GameObjects from scratch?
It is not unsolvable. It is tedious.
I have never had to do anything like what you describe.
If you find yourself doing some voodoo magic to make your game work, like rebuilding the player prefab, that suggests that either there is a bug in Unity, or, much more likely, a bug in your code. This is applicable to program$$anonymous$$g in general.
The problem here are the "weird bugs", not reassembling the player prefab. Rather than asking about how to efficiently do your voodoo to make it work again (in this case reassembling the player prefab), try to work out the root cause for these "weird bugs".
Post some questions on Unity Answers related to those specific bugs. The expected behavior, the behavior your getting, error messages and relevant code etc.
Your answer
Follow this Question
Related Questions
Second Player Cannot Navigate the Menu 2 Answers
Photon server how to control player traffic in a client network 2 Answers
Game Over GUI 2 Answers
how to find local player in multiplayer game? 2 Answers
Creating a client player and a host player in a single device and networking them correspondingly 0 Answers