- Home /
The question is answered, right answer was accepted
Calculate frame rate
Hi! Do anyone know if it is possible to calculate the frame rate during play mode? Something like... make Unity calculate it using script. If it is possible, how could i do it?
I want to calculate the average frame rate of player's while they are playing my game. Actually, i wanted to make this via script. This would let me not only show to the player the performance that he is having, but also in many other things, such as based actions.
For an example:
The player has 30+ fps, change the settings to medium. The player has 60+ fps, change settings to high. The player has 47 fps, show something to let him know, etc...
Answer by kleber-swf · Oct 28, 2016 at 04:12 PM
You can use this free extension bitif you want: https://www.assetstore.unity3d.com/en/#!/content/32042
It shows a graphic with FPS history, minimum, maximum and average values.
And it has a memory watcher too.
Answer by tanoshimi · Oct 28, 2016 at 02:49 PM
Reading up your question, this answer seems correct. If this is not what you need, then what exactly, do you need?
No, i am with you. The answer is right, but i wanted the author to help me because only them know the script exactly. I want to know where i can use the codes that i want. Just throw a link like "Run for it" isn't the best way to help me to UNDERSTAND how the process is done.
Did i said "CAN SO$$anonymous$$EONE THROW $$anonymous$$E THE SCRIPT"? No. I asked specifically HOW could i do it. It's different. For an example:
I could ask "I want to make just one script to use in many same objects, how do i do that"?
And someone could just answer:
"I know a way, you could use a variable, pretty simple. You can attach the object that you want without needing to make another script".
What you specifically asked was "Do (sic) anyone know if it is possible to calculate the frame rate during play mode?". To which the correct answer would simply have been "yes."
What I had intepreted your question to mean, and what the answer I provided showed, was "How do I calculate the frame rate via script?". But I'm glad that you found an asset to do it now.