Two minor changes to the Update function of NetworkPlayerSync.
Firstly, instead of searching for the Ping Text component every frame, it's now cached on startup.
Secondly, a bit of a micro-optimization, instead of calling transform.position up to three times a frame, it's now cached at the beginning so it's only called once.
Two minor changes to the Update function of NetworkPlayerSync.
Firstly, instead of searching for the Ping Text component every frame, it's now cached on startup.
Secondly, a bit of a micro-optimization, instead of calling transform.position up to three times a frame, it's now cached at the beginning so it's only called once.