- Home /
How do I get high smooth FPS in Unity??(Improve Fillrate)
Right now my game can only get 30fps in unity and no more than 10-15fps on on ios device(iPad 3 and iPhone 4s). I've tried everything: occlusion culling, static/dynamic batching, LOD, mitmaps, target framerate... ect. I have low draw calls, tris/verts, and low ram usage. I can't think of anything else?! I have to be missing something because I've seen expensive looking games made with unity getting 60fps?? Like dead trigger that uses dynamic lighting and reflective shaders?? How can I not even be getting half of there framrate... I've looked at many tutorials and unity docs about optimization and followed them very carefully but I'm still not getting anywhere close to decent results.
Any help/answers?
Thanks in advance!
-Austin
Are you using any Physics? GUI? Debug.Logs? These are all framerate killers...
Deep Scary Voice ---- Null Refs of Doom!
And yes, use function OnGUI() just once and you will cut your framerate. Even if its empty. Even if its in a script you aren't currently using. Even (I hear) if its commented out a certain way!
meat5000 almost made me want to troll on this :3
I think you can find many posts on forum discussing the good habits to have in programmation.
I'll give you some :
try to avoid instantiating/destroying many objects in updates or making system calls like new(), they are slow calls.
In Editor : try to hide the inspectors (especially the custom ones if you have) Even if the object is not selected unity tries to update all your variables in the editor script(even if it is actually not used/displayed)
$$anonymous$$aybe try other shaders or compressed texture, you can also play with the quality settings of your project.
Finally, you can still show us a part of your code that you think is droping fps ( you can see where the processor is busy with the profiler _ unity pro only).
cheers
EDIT: also use update() fixedupdate() and lateupdate() -> see doc to have an idea when and how to use them
I'd suggest to check the quality settings and make sure you're not using VSync "Every second VBlank" and not using high quality shadows if you have some in your project. Next use profiler (Unity Pro only) to deter$$anonymous$$e all performance bottle necks.
I'd glad to help you with project optimization (for free), just contact with me through the contact form on my blog (link to the blog is in my profile).
meat5000 almost made me want to troll on this :3
Glad to bring a smile :P
ok here it is again
Deep Scary Voice ---- Four-Deep Nested if Statements of Insanity!
Answer by LSPressWorks · Aug 05, 2014 at 04:54 AM
Even on older single core machines I have had 0 issues with framerate drop due to most of these factors. Usually it's too many Physics calls, and of course, anything that prints or debugs.
Your answer
Follow this Question
Related Questions
Different calculations/math results between Unity editor and iPhone ? 1 Answer
Is there a way to create applications that run on fixed frame rate of 60fps on iOS? 1 Answer
Low FPS rate. Can't find the problem. Followed Unity's Guide 2 Answers
Slow performance on 2D iOS platformer 1 Answer
Unity iOS sdk question 1 Answer