Finding the local player

Options
In Unet there is a variable isLocalPlayer. I have not been able to find something in TS that matches this. I also would like to know about OnStartLocalPlayer (). For right now I have written this code to get what I want:

if (localOwner.Id == owner.Id) { GetComponent<MeshRenderer>().material.color = Color.green; }
It works and sets your player to green but seems to be a work around for what I want. I just wanted to know if there is already is a function to handle this situation. Thanks.

Comments