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 /
avatar image
6
Question by CunningGrayFox · Sep 09, 2016 at 12:31 AM · optimizationtimeloadingstartup

Tips on optimizations for Android game startup speed?

To avoid wasting anyone's time I'll list out what I've done so far:

  • Crunched all assets

  • Compressed all textures using pngquant

  • Everything that was small enough to fit into a sprite sheet has been put into one using SpritePacker

  • Audio files have "preload audio data" unchecked

  • Created a scene that loads before the main game scene (may have made things worse)

  • VSync set to "No Sync"

  • Quality Levels set to "Fastest"

  • No Stripping level has been set because it breaks certain functionality

  • Custom splash screen while scene loads all dependencies in the background

I've gotten good frame rates on a HiSense Sero 7 LT(terrible android device) and I've reduced the apk size by more than 50% but with everything that I do I can't seem to get the game's startup time down.

About the device, it's a piece of crap but most games I've tested on the play store load in under 20 seconds some even under 10 seconds on this device so I know it is possible just not sure how to make it happen with Unity.

I have only a single scene and I use a transition handler to "slide away" the five pseudo scenes I have. The splash screen that I have only accounts for 25-33% of the load time while the bulk of the load time is coming from the Unity splash/loading screen. The main culprit is the Unity splash/load screen. I guess that is where I want to try and optimize first. I'm thinking about using AssetBundles to do an async load of the sprite sheets and only allow write blocking code for loading things that need to be immediately available on the menu screen. This might slim me down by ~8 seconds. I'm also wondering if the size of the hierarchy may be affecting the Unity load time.

From my understanding, the Unity splash/load screen is where all the Awake() methods run so I might just have to sift through each awake method to test it's timing.

I've searched the forums, Unity Answers and Google but I can't seem to find much. A few questions and no answers. I'm hoping someone can give me a good direction so that I can at least get this thing under 20 seconds. Anyone know what I can do to get this startup time down?

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 Addyarb · Sep 09, 2016 at 03:12 AM 1
Share

How about starting your app up with a main menu scene that requires far less resources, and loading the rest of your resources over time? A nice loading screen to keep users occupied? I would also consider that the device that you're using is the root of the slow loading issues. While I totally agree that you should target lower-end devices, dumbing your graphics down to bare $$anonymous$$imum only hurts you in the long run - considering the majority of users have devices that will have no problem running your app. I admit, it is much more difficult to scale your game quality based on device for Android - but doing things like measuring FPS to deter$$anonymous$$e the quality settings can go a long way.

avatar image CunningGrayFox Addyarb · Sep 09, 2016 at 12:10 PM 0
Share

I currently use the profiler to measure performance(FPS, CPU time, $$anonymous$$emory allocation) but the profiler doesn't profile the loading of the app. I have updated the post with information about my splash screen. I currently have a gameobject that displays once the scene is loaded that handles loading all the dependencies before allowing the player to proceed to the game. I have no issue with that screen as the time spent on that screen only account for 25-33% of 40+ seconds total load time.

avatar image playsidepaul Addyarb · Oct 21, 2016 at 12:10 AM 0
Share

Yep, doing the "startup scene that's basically a title screen which loads the main scene" has fixed this problem for us.

Alternatively, the main delay isn't necessarily loading the whole app/build, but the starting scene. Check what's in your scene and how many things it needs to instantiate, call Awake() on, what their Awake() functions do, etc - this will all happen in that final (frozen, unresponsive) "frame" while the splash screen is still showing.

0 Replies

· Add your reply
  • Sort: 

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

57 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

Related Questions

Performance issues when loading first scene 1 Answer

long loading time android 0 Answers

Profile startup resources? 0 Answers

optimizing load scene 0 Answers

Storing in PlayerPref based on timer 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