- Home /
How often is the update function called ?
I have a variable, which gets changed every update. Now I want to know how often update gets called per second.
Thank you for your answers.
Comment
Best Answer
Answer by fafase · Oct 24, 2013 at 09:12 AM
It is the fps. You can get it with :
void OnGUI()
{
GUI.Box(new Rect(0,0,100,50), (1/Time.deltaTime).ToString())
}
If you have v-sync enabled then it will also depend on your graphic card
For instance you will probably get about 60 to 70Hz which is the rate of your GPU. But my computer drops to 15 Hz if I use power saver.
Or you can use the stats and read without knowing what it means...
Your answer
Follow this Question
Related Questions
My variable doesn't update real-time? 2 Answers
Variable Doesn't Update in "Update" function 0 Answers
Random time activate/deactivate object 1 Answer
Problem with time system and variables 1 Answer
GUI Variables doesn't update C# 0 Answers