- Home /
Question by
TheSorm · May 16, 2016 at 12:36 PM ·
c#networkingplayernetwork
Network Game Player reference
I have a network game, and i have lots of scripts who want a reference to the Player gameobject. The problem is that this gameobjects are in the play scene, and they got loaded bevor the Network server spawns the player to the clients. Because of that i cant get a refernece to the player in the gameobjects start() functions because the start() functions get executed bevor the player is spawned. I just get NullPointer Exceptions. I dont know how to solve the problem because i can not put a OnStartLocalPlayer() function to the scripts because they are not NetworkBehavior.
Comment