Search code examples
c#unity-game-engineunity3d-unet

Why is my OnStartLocalPlayer and OnStartClient execute four time?


In my UNET player code i have OnStartLocalPlayer, which is executed four times. I have added a gameobject.tag so I know it is the same player. I execute this with only one client, the host-client and still i get four OnStarLocalPlayer executions.


Solution

  • I finally solved it. I had four scrips that was inhereted to the Player_Script and they caused the player script to execute one time for each inhereted script. Dunno if this is a bug or not.