- Home /
Frame counter not registering - Component missing?
I have an interesting situation. I have a frame counter (FPS.js from FirstPersonShooter tutorial) in my main game screen for performance checking. It has been working with no problems all along. Now, I am working on another scene with interface items but noticed that any yield WaitForSeconds statements are not working. I added the FPS.js to that scene and noticed that the frame counter stays at zero. Now my main game scene is doing the same thing and everything is going haywire. Luckily I backup my files every night.
Is there a component that I am missing or deleted by accident that would cause this?
Here are some tests I ran:
The Statistics window in the editor shows frames running normally.
I created a new blank scene and added the frame counter- Still no frames registering.
I opened the last backed up project file and noticed that game scene shows frames fine, any other scenes do not have frames registering. (These were duplicated from master GUI scene and include GUI buttons and polygon elements).
Noticed that this has no effect on OnGUI statements. I am deleting this system out for iOS, that's why I never noticed before.
Opened an entire new project, added frame counter to blank scene - Frame counter works fine.
Exported my HomeGUI scene, added to new project- Frame counter works fine, all yield WaitForSeconds work fine.
At the moment it looks like I may have to export all scenes and bring into new project. It's a pain but may help clean things up as to unused files and any issues that may be from numerous upgraded versions of Unity.
Here is a link to my original problem, may be of use to others: http://answers.unity3d.com/questions/204532/ios-polygon-button-not-working-with-yield-waitfors.html
Thanks for any advice!
Answer by Bunny83 · Jan 12, 2012 at 06:31 PM
Could it be that you set Time.timeScale
to 0.0?
That would freeze the time and WaitForSeconds will never be completed since the time stays the same. See this question for more information
Thanks for the response and the link, very informative!
I searched through my code but haven't used Time.timeScale yet. I've read up on it and plan to use it for the pause button but haven't gotten to that yet. Again, the strange thing is that when I export the scene as an asset and import into a fresh project, everything is fine. Could some random code such as you noted be running from my project file, even though it's not in the scene directly? Would that be possible? Thanks again for the help!
Your answer
Follow this Question
Related Questions
iOS Polygon button not working with yield WaitForSeconds 0 Answers
Low FPS rate. Can't find the problem. Followed Unity's Guide 2 Answers
Counting iphone FPS 0 Answers
I want to have FPS iOS tutorials. 0 Answers
if I lock iPhone fps to 24fps, can I get more accurate touch timings than that? 3 Answers