Basically I have a simple check for isLocalPlayer in my Start() message and set enabled = false based on the result of the check. What happens is my script still receives LateUpdate() message a single time that one frame. Is there a way to prevent that without writing an if in the LateUpdate()?
Ok I was able to side-step the problem:
- I set
enabled = falsein theAwake()method of my MonoBehaviour component. - I overrided
OnStartLocalPlayer()in my NetworkBehaviour component and inside that metod I called a publicInitialize()method from my MonoBehaviour component. - In the
Initialize()I setenabled = trueand everything works without errors.