UNet Pitfalls: OnStartClient Execution Order

Unity’s UNet multiplayer networking layer is easy to use and a good solution for any project without special demands in this regard. However, doing my second project now with UNet, I repeatedly find some pitfalls which temporarily take the fun out of programming. This time, I wondered about some SyncVars not synchronizing correctly, until I found out that my problems had nothing to do with them. Instead, I discovered that the OnStartClient method of NetworkBehaviours is not always called in the same order with other callbacks such as Awake or Start.

Continue reading UNet Pitfalls: OnStartClient Execution Order