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
1
Question by mononull · Aug 09, 2013 at 04:54 PM · loadlevelasync

LoadLevelAsync / AsyncOperation, isn't helping scene transition

Here's the problem. When I used loadlevelasync it appears to be preloading correctly. I've been doing a lot of testing and was logging the asyncoperation.progress value. The problem was it would get to around .9 and then it would then take longer to load the level than it took to preload. The preload seemed to take like 2 seconds to get from 0 to .9, but at that point my screen freezes and then it takes like 5 seconds for the next level to actually be loaded. I need it to be more fluid than that so I can have an animation playing. I have a 3D model moving around while it's preloading. Once it's done preloading the 3D model stops and then it takes 5 seconds for the next scene to actually load...making it pointless really.

 private var async : AsyncOperation;
 
 function Start() {
   StartCoroutine(Load());
 }
 
 function Load() {
   async = Application.LoadLevelAsync("Scan_Scene_Augmented");
   async.allowSceneActivation = false;
   yield async;
 }
     
 function OnGUI(){
   if(GUI.Button(Rect(5,100,100,100),"YIP")) {
     async.allowSceneActivation = true;
   }
 }
 
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 shiraz888 · Nov 15, 2013 at 02:25 AM

One thing to note, in my experience, when you set asycn.allowSceneActivation to false, the yield asycn operation will NOT return until the allowSceneActivation flag is set to true (like in your OnGUI statement).

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

16 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

Related Questions

LoadLevelAsync doesn't work as it should 2 Answers

Scene Streaming(Bethesda Style, not an internet question) 1 Answer

Webplayer Freeze / Crash After Facebook Interaction 0 Answers

Loading screen animation is getting stuck for a second randomly when using LoadLevelAsync ! 1 Answer

Loading Bar for Awake Function 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