Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by DaveA · Sep 13, 2010 at 09:40 PM · androidshadertextureoptimizationpolygon-count

Android optimizations - worst offenders?

I've ported my Win/Mac project to Android, and to my delight, it runs pretty much 'as-is' but it's got a terrible frame rate.

I was wondering if anyone knows which are the most important optimizations, in which order I'll get more bang for the byte, so to speak?

I've already reduced the poly count quite a lot.

I have a few textures, I try to keep them below 512x512, but is that too big? How much is too much?

I have some shaders running, specifically using Bumped Diffuse, Bumped Specular, and Reflective/Bumped Diffuse. Do these run in HW or are they emulated?

I have some scripts, they're pretty low-powered stuff. I do use the WWW object every 5 seconds to update elements in the scene, is there danger in that?

Any tips appreciated.

Comment
Add comment · Show 2
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 DaveA · Sep 14, 2010 at 06:03 PM 0
Share

Is there any log that might give clues, or a profiler? What about that $$anonymous$$ono Developer?

avatar image DaveA · Sep 16, 2010 at 07:58 PM 0
Share

Woot! 3.0f1: I don't know what they did, but now my app runs $$anonymous$$UCH faster. Thanks Unity!

2 Replies

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

Answer by jtbentley · Sep 13, 2010 at 11:11 PM

My guess is running through the iPhone script optimisation guide (it's in the manual) will be well worth it. Also, which phone are you running it on? There's a lot of hardware variaiton on the android platform.

Comment
Add comment · Show 1 · 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 DaveA · Sep 14, 2010 at 06:03 PM 0
Share

Thanks, will check that out

avatar image
0

Answer by Bampf · Sep 15, 2010 at 01:35 PM

When I ran my iPhone game, which has some non-trivial scripting in it, through the Unity 3 profiler, I was shocked. More than 70% of the time was spent doing GUI operations of one form or another.

If you are using UnityGUI calls or even GUITextures, you may want to look into rewriting your UI to use textures that all operate off a single material. This can reduce the drawcalls needed to 1. A product like EZGUI or the GUIManager script can help with this, though I personally have not tried either one yet.

(This is one of the topics mentioned in the optimization guide that JTBently mentions in his answer. Don't underestimate it.)

I should also mention that 5% of the time was spent in an OnGUI call that I didn't need and thought I'd removed from the scene long ago. So nothing beats putting your game through a profiler. If you are not planning to move to Unity 3 w/iPhone, you could port a version of your game from Unity 1.7 iPhone to Unity 2.6 Pro, and profile it there.

Comment
Add comment · Show 4 · 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 DaveA · Sep 15, 2010 at 09:08 PM 0
Share

Good to know, thanks. I do have GUITextures in the form of the DualJoysticks prefab. I'll try removing them to see how much it saves. Profiler: I have all 3 versions (2.6/1.7 and 3.0b7) but I've never run the profiler, it works on phone devices too?

avatar image Bampf · Sep 16, 2010 at 01:43 AM 0
Share

Yes, though keep in $$anonymous$$d it's profiling the game in the editor, not on the device. Select the menu Windows->Profiler while your app is running. I don't claim to know what everything means, but you can get some idea how much time is being spent where.

avatar image DaveA · Sep 16, 2010 at 05:32 PM 0
Share

Thanks, yeah I see that most of my time is spent rendering, hardly any in scripts. But I do worry that it's not profiling the device itself. I mean, Android vs iPhone vs ATI vs Nvidia - big difference in low-level rendering power, so it's hard to tell for sure.

avatar image Bampf · Sep 16, 2010 at 07:45 PM 0
Share

A valid concern. You can probably apply a (non-Unity) Android profiler to the problem if you have one, to verify what the Unity profiler is saying. On the other hand, if you see things you can eli$$anonymous$$ate like I did, the exact % may not matter. And desktops are so insanely good at rendering these days- if that's where Unity spends most of its time, then it's likely the device is the same or worse.

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

No one has followed this question yet.

Related Questions

why the colors are broken on my mobile phone? 1 Answer

Please Help!!! my LineRenderer Script is not show when bulid on android device 1 Answer

How do I Optimize Resources/Unity_Builtin_Extra 2 Answers

Best transparent shader for Android devices 1 Answer

Terrain Texture Problem 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