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
0
Question by Vel_1828 · Feb 08, 2017 at 11:29 AM · mobileoptimizationprofiler

HUGE Lag Spike on small scene loading!

Hello! I'm working on a small mobile game, which is using only two scenes: Menu and Game scene, alongside with one GameObject with DontDestroyOnLoad (which is only holding a script with some Read-Only color arrays).

Whe transfering between the two scenes though, I am getting a HUUUGE (~10-15 seconds) freeze spike on mobile. Profiler is showing that on the scenes temselves there's like 1000 FPS, but on scene transfer, there is one process - Loading.UpdatePreloading -> Application.WaitForAsynchOperationToComplete - which is taking a huge chunk of time to load.

How can I prevent it? What is this process?

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 hexagonius · Feb 08, 2017 at 12:23 PM 0
Share

take a look at the Profilers memory consumption. if it loads a lot that also takes time

avatar image Vel_1828 hexagonius · Feb 08, 2017 at 01:23 PM 0
Share

Unfortunately, the spike occurs on $$anonymous$$obile build, not only in editor. In editor it takes less time (as a computer has a bigger CPU/GPU than on mobile).

avatar image Kossuranta Vel_1828 · Feb 08, 2017 at 02:05 PM 0
Share
  1. Every object you have in scene will be loaded

  2. Every asset that those object have like images will be loaded

  3. Every Awake and enabled Start/OnEnable will be called

In Player Settings > Other Settings you can find list Preloaded Assets. You can add stuff from assets to that list and all of them will be automatically loaded into ram when you start your game.

1 Reply

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

Answer by Vel_1828 · Feb 08, 2017 at 04:28 PM

OK, everything is fine again - it appears that all music files used in the Game Scene were set to Load at once on Scene Load, while they should be set at Streaming in Import Settings. It's good now, thanks for answers! :)

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 tanoshimi · Feb 08, 2017 at 06:12 PM 0
Share

Thanks for co$$anonymous$$g back to share the solution. I've been caught out by audio performance in the past too - just that one little setting can make a huge difference! :)

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

86 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

Related Questions

Issues with profiler? 0 Answers

Unity profiler Gfx.WaitForPresentOnGfxThread 2 Answers

Andriod (Oculus Quest 2 app) locked at 30 fps 1 Answer

World canvas with screen space canvas performance mobile ? 0 Answers

How optimization cache with more 2.000 images 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