I use the Profile ( opengl es analysis ) in Xcode (not the profile in unity) to analyze my game, and get the results:
-
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. -
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. -
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. -
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?
thanks