Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
1
Question by joshocaoimh · Dec 26, 2020 at 01:51 AM · buttoncanvasloadloadingfreeze

Loading screen freezes as soon as I begin loading a scene additively?

I am trying to add a loading screen while the game loads behind it. However as soon as the game begins loading the loading screen completely freezes until the game is fully loaded so it's sort of defeating the purpose.

I'm not sure where I'm going wrong. How can I load the level in while the loading screen stays animated? Any help would be much appreciated!

 public class GameManager : MonoBehaviour
 {
     public static GameManager instance;
 
     public bool YesNo;
     float timeLeft = 5.0f;
 
     public Text text;
 
     private void Awake()
     {
         //instance = this;
 
         //I've done this in seperate script attached to main menu
         //SceneManager.LoadSceneAsync((int)SceneIndex.SUMMERS_CAULDRON);
 
         //Title menu needs to run load game function.
 
         YesNo = true;
         //LoadGame();
 
     }
 
     // Start is called before the first frame update
     public void LoadGame()
     {
 
         YesNo = false;
 
         //loading level in (CAUSING FREEZE)
         SceneManager.LoadSceneAsync((int)SceneIndex.SUMMERS_CAULDRON, LoadSceneMode.Additive);
         Debug.Log("GAME IS LOADING");
 
         //unloading load screen (RETURNS "SCENE TO UNLOAD INVALID")
         SceneManager.UnloadSceneAsync((int)SceneIndex.MANAGER);
         Debug.Log("LOADING SCREEN UNLOADED");
 
     }
     //5 second delay before level starts loading and screen freezes.
     public void Update()
         {
             timeLeft -= Time.deltaTime;
             text.text = "Time Left:" + Mathf.Round(timeLeft);
 
         if (timeLeft < 0 && YesNo == true) 
             {
                 Debug.Log("TIME IS UP!");
             YesNo = false;
             LoadGame();
 
             }
     }
 
 
 }
 
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
0

Answer by rh_galaxy · Dec 26, 2020 at 05:06 AM

It is possible to get a frame here and there to show but fully smooth loading screen while doing LoadSceneAsync is impossible. And You are not doing it right either.

Take a look at this answer. https://answers.unity.com/questions/1775650/smooth-scene-transition-issue-async-operation.html

Also this long answer here of how loading up to a point can be done async. https://answers.unity.com/questions/1786770/loading-screen-with-long-running-cpu-heavy-awake.html

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

141 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 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

canvas group breaks button 0 Answers

Creat Jump Button on Canvas to jump a cube 0 Answers

Google VR SDK - Distortion Correction makes World Space Canvas render on top of everything else. 0 Answers

Ui elements not scaling correctly 0 Answers

Use UI buttons with Time.timeScale=0? 3 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