i have function called SendRaycast() and i want to call it every frame .... or at least very often right now it's called whenever the object comes out of the if's inside update ... dunno how to achieve what i want here is the code: Code (csharp): void Update () { chaseTarget = GameObject.FindWithTag("Player").transform.position; SendRaycast(); if( isBlinded == true) { StartCoroutine(BlindedBehavior()); } else if(chase == true) { Chasing(); } else if(checkNoise == true chase == false) { CheckNoise(); } else { Patroling(); } }
It is already being called every frame that the component is enabled and the GameObject is active. Perhaps the other functions are cancelling it out?