optimization on iOS

I use the Profile ( opengl es analysis ) in Xcode (not the profile in unity) to analyze my game, and get the results:

  1. recommend using VAO:
    Your application used the same vertex array configuration for multiple consecutive calls to glDrawArrays or glDrawElements. Use vertex array objects (VAOs) to encapsulate the vertex array configuration, allowing optimal reuse of that configuration across multiple draw calls. See documentation on glGenVertexArraysOES and glBindVertexArrayOES.

  2. shader compiled outside of prewarming phase:
    OpenGL ES Analyzer detected a shader compilation that is not part of an initial prewarming phase. Shader compilation can be a time consuming operation. To avoid them, prewarm all shaders used for rendering. To do this, make a prewarming passwhen your application launches and execute a drawing call with each of the shader programs to be used, using any gl state settings the shader program will be used in conjunction with. States such as blending, color mask, logic ops, multisamping, texture formats, and point primitive state can all affect shader compilation.

  3. recommend using VBO:
    Your application sourced vertex array data from client memory rather than from a vertex buffer object (VBO). In this situation, every time glDrawArrays or glDrawElements is called the data is retransmitted to the graphics hardware to be rendered. Use VBOs instead to store the per-vertex data. See documentation on glGenBuffers, glBindBuffer, and glBufferData for more information.

  4. redundant call:
    This command was redundant.
    glUniform4fv(10, 1, {1.0000000f, 1.0000000f, 0.0000000f, 0.0000000f})
    OpenGL ES Analyzer detected a GL function call that sets a piece of GL state to its current value. Minimize the number of these redundant state calls, since these calls are performing unnecessary work.

there are other recommends. I just list the top four …
with these recommends, what can I do to optimize my game in unity?

Profiling a Unity-based game on iOS with XCode will not help you. You should use Unity profiler to track your script execution time, number of draw calls and number of physics contact points.

That said, possible optimizations for iOS games are:

  1. Use low-poly models.
  2. Don’t use transparent shaders with alpha testing (prefer alpha blending instead).
  3. Static batch anything you can.
  4. Track any references made in code and reset them to null when you don’t need them.
  5. Call the garbage collector explicitly (at least each time you load a new level).
  6. Do not use MeshColliders. Try to make compound colliders with primitives (Box, Sphere and Capsule).
  7. Load Resources when needed and released them after use (see: http://unity3d.com/support/documentation/Manual/Loading%20Resources%20at%20Runtime.html ).