- Home /
My game is finish but is lag on Android! it's disappointing!
Hello
I finally finalized my game for Android and with the luck I have!
It is not working properly. I have a tablet (Galaxy Tab E) and my game, but way too much time to throw and lag when navigating the game!
The worst part is that there is no 3d Object! I can't even imagine, if I had put it on! My game is simple and works with Unity's UI feature! It's all in 2D and works with Canvas Image! + ADS !
I do not understand why the game rows on Android !?
On my PC it works, but when I test on the tablet it takes time to load! I put the Statistics in picture, but my "Batches" of my stats is only 29!
I've been researching the forums on the current problem. I followed the advice to put my GameObject in Static and uses the function of the code "SceneManager.LoadSceneAsync" but still the same when loading on Android ...
(For the record I only used two scenes, because the game simply works with images!)
Could someone help me make it more fluid on Android?
I was ready to publish the game, but if it just lags on tablet and phone. No one will play it if the game takes 3 minutes to throw!
Thanks in advance for your help !
CPU seems to be your bottleneck,
it's not accurate to align PC statistics to mobile.
You have to debug the game right on your phone, I remember you could use android ADB to live monitor performance of your game running on your phone by Unity I guess.
Anyways, judging from your screenshot, your CPU ms is 1 whereas your GPU's 0.3 so it must roughly be heavier on CPU. check profiler and see what is taking most of your CPU power. most of the time "Batches" count is not as effective on performance as GC and coding structure is.
Thank you @$$anonymous$$ehrdad995 for your comment. Yes precisely I test my project on tablet and phone before publishing it. It is true that I should have done the test long before, but to be honest I think not that with the can of data as well as functionality could make the game delay on Android. If I look in the profiler, I can see when browsing the game that BehaviorUpdate goes up to 50% total. And then Camera.Render remains the one that climbs the highest. The problem is that I do not understand the graph at all and do not see how to improve the calculation of the CPU?!
thx advance
That's quite strange!
please expand the ■Camera.Render and ■Behaviour.Update in the hierarchy and send the screenshot.
//Are you using raycasts heavily? like +50 in a frame?
//Do you have a loop inside an update function?
//Are you using the Unity 2020 version?
//Are you using SRP?
//Are you using Post-processing stack v2?
//Are you on an alpha version of unity?
Answer by JxWolfe · Apr 09, 2020 at 10:13 PM
Broo... what on earth are you doing! Those scripts should never be that high! That's your main issue right there. Most "Mobile Tutorials" work on lowering rendering, but you hardly have anything to render. Your scripts are junk. Post them on here and I'll see about streamlining them.
Hi @JxWolfe thx you for help Indeed I begin to understand that my scripts are bad for the understanding of Unity3d. I'm desperate that there is so much a problem for such a simple game...
I publish my problem on the forum in the 2D section and I @$$anonymous$$artinTilo that also helps me understand where the problem comes from... And we're getting to the point where you're stipulating. That is, my scripts...
You can come and see, there is a lot about my problem as well as scripts ... Thx you
Thanks for the follow-up. I'm glad someone else knows the debugger better than I am. Glad you found a solutions that helps!
Answer by Giannigiardinelli · Apr 07, 2020 at 06:44 PM
Please can someone help me understand the problem?
However, the game is not heavy under build
Answer by Vipertex13 · Apr 08, 2020 at 06:08 AM
Hello!
Try watching a youtube video on how to reduce lag.
Try watching this video
Hi and thank you @Vipertex13 The video you send me I had already seen but not to the end.
I'm going to watch this! Thank you... The only problem is that I didn't want to do it all over again in my game to finish. Which would sadden me again!
Hi @Vipertex13 , I watch the video and unfortunately it didn't change anything. I also followed this unit tutorial (link text) (for info I haven't finished it yet) but I'm still at the same point... Yes my game is really very simple! it has no 3D objects! I only have images (Sprites) hence the reason for my frustration with the Unity3d software! I also publish the article on The Unity Forums (here) Here if you have another trick to share, I'd be recognized!
Your answer
Follow this Question
Related Questions
Problem to disable collision with canvas 0 Answers
Create Unity UI Panel via Script 1 Answer
How to show my Buttons over texture ? 0 Answers
Canvas Screen Space Issue 1 Answer