Hi , i want to run some code once in prude of time , for example show value of x every 10 second , i use this code :
int x = 0;
void Update () {
if ((int)Time.time % 10 == 0 && Time.time > 3 )
{
Debug.Log(x++);
}
//Debug.Log((int)Time.time);
}
but after first perude my output in console show x value from 0 to 187 !
how can i run Debug.Log(x++) once every 10 second
thanks