- Home /
Frames per second meter/indicator
Hello
I'm Making a simple benchmark-tool to see what features are heavy for the CPU/GPU. and how far i can go on a specific system. I'm not a programmer, but i found a great script to show me the frames per second. Is it possible to link this to a meter? It would be great to make a little meter shows the user if the demo is running "poor" "good" "great!" etc.
I'm sure there is a way to use the FPS and link them to an animation or position. But i'm not sure how :)
Answer by Skjalg · Mar 04, 2011 at 11:46 AM
Yes its possible, but you'd have to make it yourself. In the code where you calculate your fps all you need to to is store the fps for that exact frame (could be helpful to store the time and the fps together).
All you'd have to do then is to display what has been stored any way you can think of.
Answer by Joshua · Mar 04, 2011 at 01:50 PM
Am I correct in assuming you are just asking how to display a variable? Look into how GUIText works. Basically inside your GUIText you first want to call onto the variable containing the most recent FPS, which you have to store in the script you have running your FPS atm.
When you call this, inside the update function then put something like if (FPS > 50) {guiText.text = "Framerate is good";} else if (FPS >30) {guiText.text = "Franerate is ok"} else if (FPS > 15) {guiText.text = "Framerate is poor"}, etc
hope I was clear enough. If you need more explanation, please ask.
Hey guyz, thanks for the quick reply! I need to take a look at this, and try joshua's script. i can do this next monday. Thanks!! I'll let you know ! :)
Happy to have been of help. Please select this question as the correct answer then so the bot won't keep bumping this now closed question. Upvote would be nice to of course.. ^^
Your answer
Follow this Question
Related Questions
Benchmark score resuilt script 0 Answers
FPS damage arrow? (raycast shoot) 2 Answers
Benchmark FPS Counter 2 Answers
animations or code? 1 Answer