- Home /
Tiny scene, horrible performance iOS
I'm working on a game that currently has 78 tris (not 78K), 27 Draw Calls, and 204 verts.
I get anywhere from 90 FPS to 300 something FPS. When I push it to the iPhone 4, its so slow its unusable. All I have is a couple of buttons and a series of cameras made with NGUI that create a fake UITabBar like in iOS apps.
Any ideas why this would be happening? What do you need to be able to help me with this problem?
How many cameras do you have in your scene? Are they all enabled at the same time? Did you try to turn all but one off?
I have about 8 cameras but I'm only running 2 at one time. One camera is there for the gameplay functionality and the other is there as a HUD with some buttons. The buttons turn on other cameras and turn off the one that was on so at most I run two cameras.
This is pretty normal isn't it?
Answer by Landern · Jan 10, 2013 at 11:25 PM
Do you have the Pro version of unity? If you do, profile profile profile the crap out of your project.
If you don't, make sure you don't have any empty start/update/fixedupdate methods/functions.
Make sure that you limit GetComponent in Update/FixedUpdate functions/methods. Sometimes people make the mistake of using GetComponent each frame when they should do it on start, this isn't always the case, but something to look out for. Without seeing code or screens these are stabs in the dark.
Could also be over fast physics fixed step. Could be anything :)
Running Unity 4 Pro, iOS Pro. I have just started to learn to use the profiler.
As for things in the update functions, I don't have anything in the project yet. I built the project with all the 3D and all the interesting animations and then built another version to work on the HUD or menu items. The complicated one runs like 'Butta' (said in a thick NY accent). The one I put together with just a bunch of NGUI cameras (only two cameras on at a time) runs like s***.
I've not heard of Over Fast Physics Fixed Step, I'll look into that as a possibility.
I appreciate the stabs in the dark and I'll see if somehow something got thrown in the update functions.
Answer by Meltdown · Jan 11, 2013 at 11:33 AM
Read this http://docs.unity3d.com/Documentation/Manual/iphone-performance.html
and this http://forum.unity3d.com/threads/130163-ShadowGun-Optimising-for-Mobile
If you're not using any Physics, try get those draw calls down. I know you're using NGUI but make sure you don't have any empty OnGui running anywhere.
If you're using physics, remove those first then check again, physics is known to kill mobile devices.
Read the docs. I'll also try some of those optimizations. I'm not sure how this is possible though. I mean the project at this point is literally this.
A fake UITabBar A fake UINavigationBar Three buttons in the TabBar Each button toggles a camera on and the others off. Each camera view contains a couple of buttons drawn from one atlas and a couple of labels from one font atlas.
On a separate note, my first game has almost 1,100 draw calls, over 275$$anonymous$$ tris and has some basica animations and many lights, Runs awesome on my iPad 2. I'm going to restart the project and see if the same issue occurs.
If I don't get the same issue, I'll post code from both so all can see.
Thanks for all your suggestions everyone!
Your answer
