- Home /
Problem is not reproducible or outdated
Perfomance for Mobile
Hi folks,
you know what settings I have to make to get the best perfomance for Mobile? My currently settings are lagging on my Galaxy S2
I switch the Shader to "Mobile/Diffiuse". Is there another point, that is important?
Greetings
Answer by Kirlim · Feb 05, 2013 at 12:50 AM
As GPU on mobile devices are weaker, its highly suggested that you use the simplest shaders available that results in good or acceptable quality. There are lots of possible causes for lag - from scripts to rendering, but the ones I did cross most often in practical life:
Diffuse shaders can be changed to unlit shaders if you are not using lights. Also, each object lit by a light will require an extra draw call to be rendered.
Textures sizes have a really big impact on performance. I think that is because mobile devices gpus lack dedicated memory (I am not sure). However, making your textures as small as you can (in sizes of potencies of two) may speed up rendering. Try playing with the mipmap settings, too.
Reducing draw calls often improves performance. Only once I had slower execution time be reducing draw calls. There are many techniques to reduce draw calls to be listed here.
This one is on cpu side. Moving Game Objects with a static collider attached, and no kinematic rigid body attached on same object. Figured out that the overhead can be a killer.
Garbage Collector.
There are more techniques than I can list here. Examples:
http://docs.unity3d.com/Documentation/Manual/MobileOptimisation.html
http://docs.unity3d.com/Documentation/ScriptReference/StaticBatchingUtility.html
Happy optimizing =D. Also, if you're able to, always profile before optimizing. If you're not, try to determine bottlenecks by testing. Programmers have horrible intuition on what and where are the bottlenecks.
Hi $$anonymous$$irlim,
thank your for your answer :).
But I found the fault. It is two Playerprefs, wich is called when a trigger is hit. And this cause the lag. I catch it in the Profile in Unity.
Thanks again =)
Follow this Question
Related Questions
One atlas per scene or one (larger) atlas across multiple scenes? 0 Answers
Material texture artefact on mobile platforms 1 Answer
Perfomance with a helicopter rotor 2 Answers
[SOLVED] TrueColor: Performance loss, bigger file size or both? 1 Answer
Camera flickers near terrain grass/detail on Mobile 0 Answers