Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by GilArnau · Oct 06, 2016 at 09:03 AM · script.optimizationgpucpu

How do I optimize my game when I've tried everything and still runs slow?

Hello,

so my little game for android is pretty much done, the problem is that when I run it on my phone to test it out it doesn't run 100% fluid. It's not critical but still bothers me. I've tried to fix this in so many ways i don't even know what else to try. The thing is, in the game you move forward in a straight path and you can move left and right to avoid objects. Similar to a temple run, yes. But the game only runs slow when the player is on the middle lanes. It runs perfectly when it is on the outer lanes. I've reduced garbage collection by almost 90%, tried lighting on and off (there is actually only one directional baked light and it doesn't even cast shadows), removed objects, added occlusion culling so that there are not unneccessary obects to render, reduced the far clipping plane of the camera at less than half, optimized the code as much as possible. And it still runs slow.

Does anyone have any idea of what could this be? How else could I fix it?

I've also tried ETC texture compression which I've read is perfect for android but doesn't make any change. The game is composed by cubes with no texture, only standard colours and there are a maximum of 120 objects in each level, and not all of them are rendered now, so it's not that much.

Could it be my phone? It's a Samsung a5.

Thanks so much, waiting for anyone's response since i've ran out of ideas.

Comment
Add comment
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 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by chillersanim · Oct 06, 2016 at 09:14 AM

Have you already profiled your game?
If not, make a build with autoconnect to profiler.
Do a deep profiling run and then check what is slowing down your game.

Might be of help:
http://answers.unity3d.com/questions/32368/how-do-i-profile-on-an-android-device.html

Greetings Chillersanim

Comment
Add comment · Show 7 · 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 GilArnau · Oct 06, 2016 at 09:27 AM 0
Share

I have profiled it in the editor with the profiler window, used it to reduce the garbage col.

I just tried the autoconnect profiler build but I don't understand how it works because i don't see any change in the game on my android or I don't know how to see the stats the autoconnected profiler is supposed to display. First time trying this build option so I'm pretty lost haha What's the purpose of that? I didnt understant much the post you sent me to, sorry. I'm pretty new to this.

avatar image chillersanim GilArnau · Oct 06, 2016 at 09:44 AM 0
Share

The autoconnect profiler option makes the game try to connect to your unity instance so that you can profile the app.
This would allow you to find CPU spikes, bottlenecks etc. which only appear on your android device.

If you enable that option, Unity with the project needs to be running and the android device needs to be connected.
Don't know whether there are other requirements as well.
As soon as the game starts, it will try to connect, and if sucessfull, the profiler will automaticly start showing data.

avatar image GilArnau chillersanim · Oct 06, 2016 at 12:30 PM 0
Share

Thank you, I'll take a look into it, see if I can figure it out! btw do you think it could have anything to do with any parameter of the optimization or configuration tab? ( see picture )alt text

unityask.jpg (368.5 kB)
Show more comments
Show more comments
avatar image chillersanim · Oct 06, 2016 at 04:16 PM 0
Share

Can you post a few screenshots of the game scene in vertical and horizontal game mode?
Perhaps even a short video demonstrating the lag?
That would help a lot, as I now have to assume that it's the GPU which is the limiting part.

avatar image GilArnau chillersanim · Oct 07, 2016 at 04:59 PM 0
Share

Hi! I just let the screen locked on horizontal, since I realized the gameplay is better that way. $$anonymous$$ore space to put the moving buttons on without the fingers blocking the screen... Thanks for all your help. It probably was that the phone had too many objects to render from upclose...

I posted another question if you want to help me with that...I'm a deep well of questions yes...It is google play advertising ID related. Here's the link in case you wanna take a look at it.

http://answers.unity3d.com/questions/1253247/advertising-id-how-important-it-is-how-to-implemen.html

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

79 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

Related Questions

SetActive or SceneManger? 1 Answer

Running GI on a low end cpu 0 Answers

GPU profiling time not adding up properly and GPU taking up lots of time 2 Answers

Difference between GetComponent 2 Answers

Intermittent unexplained frame rate drops due to Gfx.WaitForPresentOnGfxThread and Semaphore.WaitForSignal. Can someone help me understand what is going on? 1 Answer


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