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!