- Home /
My framerate on iPhone is low, should I switch to 2D?
Hey guys, I'm currently developing an iPhone game. I have been using 3D objects for the scenery. It is essentially rectangle constructed from 4 unity cubes. Then on the inside I have other 3d objects as obstacles. Testing the game on the pc, it looks fine. When I test on the iPhone, the game looks a little more choppy, in addition to the physics looking choppy too. This game is not graphics intensive at all and was wondering why it was acting this way. Maybe I have too much GUI? I've looked at optimizations for the iPhone and have looked at the steps. I was thinking maybe it comes down to me using 2D instead of 3D?. The game essentially looks 2D because of the camera view, but I've never worked with 2D.
Well are you using Unity's Remote app or are you installing on your device every build? If you are using Unity's remote app, it will lag a lot and that is normal. The app is just there so you can use touch controls.
Look at the profiler and see what the issue actually is; it doesn't make sense to just guess.
@$$anonymous$$r. Professor Troll I am installing on the device every build.
@Eric5h5 I am using Unity free. It does not come with the profiler.
I researched some more and thought maybe it's because I am using OnGUI() intensive scripts? Although, there isn't much there in terms of GUI. Just a couple of buttons.
Yes, it does come with the profiler. I'm talking about the profiler that runs on the device, not the in-editor profiler.
http://docs.unity3d.com/Documentation/$$anonymous$$anual/iphone-InternalProfiler.html
It would be a lot better if you put the Translate functions in Update. Only GUI code should be in OnGUI.
Answer by cscotttaakan · Dec 08, 2013 at 06:56 PM
Alright guys, figured out problem just put your Transform.translate() function in the Update section. I previously had my translate function in OnGUI(). OnGUI may be called several times per frame where as Update is not. This made the movement look jittery because opposed to moving 1 unit every frame, it moved a couple units sporadically.
Thanks guys for your help!
Your answer
![](https://koobas.hobune.stream/wayback/20220613123649im_/https://answers.unity.com/themes/thub/images/avi.jpg)