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 Yohann1172 · Aug 25, 2015 at 03:58 PM · guiload level

How to keep "Loading" animation from freezing while loading a large level?

I have a simple scene with an animated "loading" spinner (it's a uGUI animated sprite) along with a script that loads my actual game scene. The problem is that the loading animation freezes while Unity is loading the game scene -- several seconds of lag. Is there a way to keep the loading animation smooth while Unity loads up the game scene?

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

2 Replies

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

Answer by goibon · Aug 25, 2015 at 04:25 PM

Have you considered using Application.LoadLevelAsync ? That should allow your current scene to run while loading the next.

Note that Application.LoadLevelAsync is a pro feature in Unity versions prior to Unity5.

To get better performance of your loading screen scene you can opt to use Application.backgroundLoadingPriority to lower the priority of loading data asynchronously.

Note that lower priorities give better performance of current scene at the cost of longer load times.

Comment
Add comment · Show 3 · 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 Yohann1172 · Aug 25, 2015 at 07:10 PM 0
Share

Thanks goibon, it didn't completely fix it, but it's slightly better. I have the LoadLevelAsync set on a couple second delay, so I can first see the smooth animation of my loader spinner, but when the LoadLevelAsync kicks in, it gets really choppy -- like maybe a frame every 2 seconds or so. Before it was dead frozen, so this is technically an improvement, but I was hoping for it to be smooth all the way through. Any other ideas? (FYI, I tested a complete re-build; I didn't merely test in the Editor)

avatar image goibon · Aug 25, 2015 at 07:17 PM 0
Share

Hmm.. Ok well I'm glad you did a rebuild because the editor will not give a smooth result. Perhaps you could try lowering the priority of the loading, it will cause a longer load time but should result in better performance. See here for reference: http://docs.unity3d.com/ScriptReference/Application-backgroundLoadingPriority.html

avatar image Yohann1172 · Aug 25, 2015 at 08:39 PM 0
Share

That was a another noticeable but marginal improvement. However, I happened to notice that the problem went completely away when I scrapped all my lightmaps. Then I noticed my Realtime GI resolution was set to 8 texels/unit ins$$anonymous$$d of the default 2. I changed to 2, rebaked, and now it seems pretty good. $$anonymous$$y loading animation isn't butter-smooth when then the loading kicks in, but it's pretty good and totally acceptable. Plus, my level loads faster so it's almost a moot issue now.

Both the LoadLevelAsync and ThreadPriority.Low were great tips, so thanks so much for those!

avatar image
0

Answer by Foulcloud · Aug 25, 2015 at 04:26 PM

As goibon mentioned, you will need to use LoadLevelAsync to do this. In unity 4, this is only available in the Pro versions.

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

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

28 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

Related Questions

Can't get 4.6 GUI Button to Load Scene (Solved) 1 Answer

Load/Change scene with UI Button 1 Answer

Problem with Load Level Script 1 Answer

Drawing-Order in 2D topdown game 2 Answers

button drawn last not triggered 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