标签:object update ras guide find already mode instant loop
We have established some guidelines for 3D games to reduce crashes and optimize performances, please have a look and make sure to follow above ones. Let me know if you have any questions.
1) MOST IMPORTANT: Use the Unity Profiler to know what is causing the framerate to drop
2) Make sure every rendered object is a prefab (it‘s especially important for sprites with alpha)
3) If using Physics 2D, make sure any changes to RigidBodies are done in FixedUpdate, it‘s very important
4) If using Physics 2D and RigidBodies, make sure to limit Continuous Collision to a main character/element, everything else must be Discrete (Not sure if applies here but still)
5) Graphics Settings V-Sync should be set to Every V-Blank
6) Before you build an Android .apk, go to Android Player Settings -> Other Settings, and untick Auto Graphics API, only add OpenGLES2 and do not use 3 nor even add it
7) Unoptimized Shaders could be an issue, that‘s what caused some framerate drop on another published game
8) Don‘t use big Texture files when possible
9) Occlusion Culling could help if there are too many offscreen elements rendered
10) Use pools of game objects, avoid destroy/create loops and reuse already instantiated game objects when possible
11) Be careful with GameObject.Find<>() and never use it in any Update nor FixedUpdate loop, it butchers performance drastically. Prefer static references if you need to access a GameObject during updates
12) HQ Realtime Shadows may greatly affect performances
13) 3D Models with a lot of Vertices may affect performances
14) Reflective and Transparent shaders may affect performances prefer to use Diffuse shader available in Unity when possible instead
标签:object update ras guide find already mode instant loop
原文地址:https://www.cnblogs.com/wayne1984/p/11669880.html