TL;DR At the Bottom.
I honestly did not have any other idea of how to name this thread.
Network.Instantiating objects is completely random.
From the start:
I’m making a first networking game project to teach myself how to do it. A simple, 3 player shooter.
Of course I have watched and read tutorials for days now and implemented everything accordingly.
When a Player enters the game, he is being spawned. Right after that, his mesh is separately Network.Instantiated and childed to him (due to an option to change your character skin via Playerprefs).
In the game itself, the Players can change weapons, from 1 to 3 (knife, pistol, shotgun, basics). These weapons are made through Net Instantiate too - at weapon change the current weapon is Net.Destroyed and a selected one is Net.Instantiated.
As long as in the game is only one player - all’s fine. Now the problem is - the outcome of NetInstantiating is almost always random when a second player enters.
The parenting of instantiated objects sometimes works, sometimes not, their scaling is most of the times screwed up, the Objects often appear at V3(0,0,0) or at their desired spawn point, they are getting Instantiated in multiple copies scattered around the scene… it’s just a fire-engulfed Jason Polloc paining.
SO FAR I have tried several different configurations of NetworkView.isMine, changing RPC functions, messing with NetView.vieid’s and so on and so on. Heck, I even added NetworkViews on EVERYTHING in an act of a Weltschmerz agony. Not mentioning animations not playing over network but that’s a different matter.
The Internets are getting even worse when it comes to googling my answers, because everything just doesn’t work as intended or there’s no intel on these issues.
TL;DR / CONCLUSION
Thank you, kind adventurer, in advance. You’re saving lifes right now.