- Home /
Features not to be found in unity android platform
i am using pc platform to develop game with complete prefab trees, grasses, with buttons ,progress bars,text etc.. when i converted or transferred it to android platform and build it coz i wanted it to be played on tablets..some of the trees and plants were missing. the fonts were also changed.. can anyone explain what happened to my situation??
regarding the scripts, i figured out how to change my onmouse functions to touch functions in javascripts..i might be able to handle the scripts... my problems are just the trees and others..
can anyone explain?? PLEASE :(
Answer by jorjdboss · Jan 24, 2013 at 05:19 AM
Are you using Unity's trees, this may be the problem causing it to disappear. Also make sure to keep the draw calls in check and combine static meshes as much as possible. Check out the [Unity Mobile Optimisations][1] [1]: http://docs.unity3d.com/Documentation/Manual/MobileOptimisation.html . I'm sure you'll sort out your problem after going through it
@$$anonymous$$aulik2208: Can't say if 100 is the correct maximum limit because the android hardware is so fragmented.
The best way to check it is to test on a mid-low end device first. Also depends on the shader used, if you use simple shaders(or no-lighting shaders), you have more room for draw calls because there's not much processing done in each batch of vertices that are rendered.
Also keep in $$anonymous$$d that there's a major tradeoff between number of vertices rendered in one frame and the number of draw calls. They should be balanced to get the best quality to performance.
If you have 1 huge mesh with everything in the level, the app will crash if it runs out of RA$$anonymous$$, because it has to load all the mesh data and textures into memory. On the other hand if you have 1000 individual meshes and at a certain point the camera looks at a large chunk of these meshes resulting in large number of draw calls, the app may crash because the gpu cant render too many meshes.
Tip: Unity's dynamic batching automatically combines static meshes which share the same material before sending them to the gpu. Batches upto 900 verts are accumulated. So you could divide your level into several meshes of about 900 verts each. So you're making the engine's work easier and the artist's work harder :P
@ jorjdboss please read my answer carefully 100 draw calls was my guess.....so no need to stick it....and here i want to clear on more thing even lighting can make huge impact on draw calls as well as memory also.......but here our concern was to check the possibilities (error and try method)......i have pointed just one thing for weird behave of app on device......and no one can surely say that whats going wrong without checking the whole project so one should check all the possibilities one by one.......and as a reference to the link given by you kindly notice that they are explaining all the things one by one so it is more suitable to go one by one to avoid lots of confusion and other panic.......Across the globe around 2500+ devices are there so how to deter$$anonymous$$e which is the basic model and lots more stuff out there.....i am not wanting to disappoint anyone but as per my opinion it's best practice 1) Reduce the number of DrawCalls first and then check for other things if the problem still persists..............
Answer by Maulik2208 · Jan 24, 2013 at 05:25 AM
@jorjdboss has a point here....if you are having too much draw calls....then it will become the main reason for crashing the app.... or causing weird behave of app......So, first of all in unity's game window click on stats and check how many draw calls are there.... I guess for android it should be around 100 is good.....so if you are going more then it.... go for the optimizations of draw calls.....link is provided by @jorjdboss so i am not posting it again.....cheers enjoy.....Don't forget to mark if helped..........