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 Vince_H · May 15, 2015 at 02:04 PM · javascriptwebglcoroutineupdateunresponsive

WebGL prevent Unresponsive script warning

To my understanding the unresponsive script warning in browsers pops up after a few million instructions have been run in 1 javascript without reaching some sort of conclusion to the code.

Seeing how Unity does not trigger this warning on it's own (being a game loop and all). I assume that it somehow reports back to the browser that a timeframe can elapse. I imagine this works kind of like a coroutine, where the browser is the unityEngine, and the unity game is the coroutine doing a yield return null; every frame or so.

Currently i am using a 3rd party tool which does not allow me to fiddle with it. It does a load of math in 1 frame (for some reason no coroutine is in that tool) and it does this at the start of the level during loading. All this is covered by a loading screen for other builds, but WebGL starts complaining about unresponsive script due to the massive loop it gets dumped in for a few seconds.

Now my question: Is there a way to make unity do his callback to the javascript to let it know everything is still ok and running? If not, would there be a way to implement this, or could this become a feature request?

I imagine it to work a bit the same like the way one can update a form in a windows form application when you have a horribly long loop in there. I forgot how it was named however.

Any advice, help or insight is greatly appreciated. Thanks in advance, Smileynator

Comment
Add comment · Show 1
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 Charles-Van-Norman · Jan 26, 2017 at 10:36 PM 1
Share

i have the same problem and would like to see a solution to this, it's a terrible experience for my user to see "Script unresponsive" when the game is just loading. My game is about 30MB Gzipped

1 Reply

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

Answer by andrew-lukasik · May 21, 2021 at 11:50 AM

I fixed this by making sure that the very top scene in my build list (the one that's auto-loaded at game start) is as slim as possible. I made a empty scene with a single script that loads the next, asset-heavy, scene and this pop-up message disappeared.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

void update working under conditions 1 Answer

Unityscript: Accessing functions from other scripts 1 Answer

WebGL error after hosting 1 Answer

Constant Yield Time 1 Answer

Look at wont update? 2 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