Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Giannigiardinelli · Apr 07, 2020 at 02:14 PM · 2d gamecanvasui imagestatisticslags

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 !alt text

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! alt text

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 !

forumlagsmygame.png (334.5 kB)
forumlagsmygame2.png (111.4 kB)
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mehrdad995 · Apr 07, 2020 at 02:27 PM 0
Share

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.

avatar image Giannigiardinelli Mehrdad995 · Apr 07, 2020 at 03:43 PM 0
Share

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?!

alt text thx advance

forumlagsmygame3.png (375.0 kB)
avatar image Mehrdad995 Giannigiardinelli · Apr 09, 2020 at 02:16 PM 0
Share

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?

6 Replies

· Add your reply
  • Sort: 
avatar image
1

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.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Giannigiardinelli · Apr 10, 2020 at 09:02 AM 0
Share

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

Forum Here

avatar image JxWolfe Giannigiardinelli · Apr 11, 2020 at 12:38 AM 0
Share

Thanks for the follow-up. I'm glad someone else knows the debugger better than I am. Glad you found a solutions that helps!

avatar image
0

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Vipertex13 · Apr 08, 2020 at 06:08 AM

@Giannigiardinelli

Hello!

Try watching a youtube video on how to reduce lag.

Try watching this video

https://www.youtube.com/watch?v=LwwP6tWLm6A

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Giannigiardinelli · Apr 08, 2020 at 08:42 AM 0
Share

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!

avatar image Vipertex13 Giannigiardinelli · Apr 08, 2020 at 06:52 PM 0
Share

@Giannigiardinelli

Hello!

Tell me if the video helps

Is your game 2D

avatar image Giannigiardinelli Vipertex13 · Apr 09, 2020 at 11:43 AM 0
Share

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!

Show more comments
avatar image
0

Answer by VEOdev · Aug 29, 2021 at 08:03 AM

This should fix your problem:

 Application.targetFrameRate = 60;

Long video, saying the same thing

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by VEOdev · Aug 27, 2021 at 12:41 PM

Watch this video, should fix any application lag

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

170 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Transform translate not working properly in Canvas 0 Answers

Converting to "Rect Transform" permanently deleted part of my project 0 Answers

How to change UI image render order dynamically on runtime 1 Answer

how to instantiate UI image in unity2D 1 Answer

Clamp UI Image to Canvas 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges