I think we shoshould together in the community create a big checklist of things to think of, especially regarding performance, when it comes to 2D games for the iPhone done with unity. if you write your tips here I cocould summarize them here. and once we get the list growing we shoshould make this a sticky! What do you think?
The things that are currently on my list:
* Use an ortographic camera if you want everything to be completely flat. however using a camera with perspective will give you parallax for free just take a look at how you set things like your field of view.
* Never use the plane primitive that comes with unity if you want to display a simple Sprite on a 3D surface. it consists hundreds of triangles, you shoshould only use a quad with 2 triangles. you can create them with a 3D editor or this script: http://www.unifycommunity.com/wiki/ I ...le=CreatePlane
* Disable MIP-maps for textures that never change in scale.
* Disable Filtering for textures if that you want them to look more crisp and less blurry. this however requires that you use a good texture size and scale of the quad, mesh etc you apply the texture.
* Use per-platform overrides for textures so that they are scaled down for your iPhone build for example. Read more here: http://unity3d.com/support/documenta.../Textures.html
* Even if you are using flat meshes for graphics, give the physics colequalers some Z-depth to avoid problems with the physics simulations.
* For All rigidbodies, once you made sure that the colateers for the ground have enough depth, also make sure to contrain the rigidbodies so they don't fall out into 3D space. select the Rigidbody, click the contraints property in the inspector and set it:
Position: locked for Z
Rotation: locked for X, Y
* For problems with the render ordering of things as the camera moves, take a look at material. renderqueues.
* Use OpenGL 1.1 before 2.0 for more speed (not true anymore? Difference ?)
* Change the framerate to 60.0 fps in the appdelegate if you want more FPS. (default is 30.0)
* Use the unauthenticated shaders for the textures, do not use light sources. (are there currently even more optimized shaders than the unauthenticated ones ?)
* Take A Look At sprite Manager 2 and ez GUI from AB software, it might just suit your needs perfectly: http://www.anbsoft.com/middleware/
I will clean this list up and improve it as you guys give me more info, or if I find it myself. i'm not even sure all the things I have written are true, and some need more explanation.
Help me out!
//////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////// //
Http://forum.unity3d.com/threads/85974-2D-game-for-iPhone-checklist