- Home /
Question by
robert_mathew · Dec 17, 2011 at 02:48 AM ·
gameframerate
run game somthly
what are things we should consider to make the game run smoothly with good frame,What are the things we aviod in scripting and in game to make the game run smoother
Comment
Best Answer
Answer by Bunny83 · Dec 17, 2011 at 03:43 AM
That's one of those questions that can't be clearly answered since it depends on many things. However if your game runs too slow in the editor make sure you:
- don't have a Debug.Log or print that is called every frame since it's horrible slow.
- Avoid any search functions (FindGameObject, FindObjectOfType, ...) in Update or any other frequent running function.
- If you have Unity pro, use the profiler to see what eats up the most cpu time.
On mobile devices:
- keep the drawcalls low. Use shared textures and combine meshed if possible.
- avoid creating / destroying objects (Instantiate() / Destroy()). Use object pools.
- don't use the GUI system for heavy menus. Each GUI element will cause at least one drawcall.
Your answer
Follow this Question
Related Questions
Which frame rate is correct? 1 Answer
Target frame rate between scenes 1 Answer
How do I put a "Rate game" button? 6 Answers
Muzzle Flash Works In Editor - But Not Build?? 2 Answers
Lower Frame rate for less polys ? 1 Answer