Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout = 2000? #7

Open
natebluewizard opened this issue Apr 18, 2019 · 2 comments
Open

Timeout = 2000? #7

natebluewizard opened this issue Apr 18, 2019 · 2 comments

Comments

@natebluewizard
Copy link

Curious what the purpose of the 2000 (2 sec) timeout before the loading screen disappears? is there a reason for that? It doesn't seem to be in the original unity webgl template so not quite sure if it serves an actual purpose in your template?

setTimeout(function() {
loader.style.display = "none";
}, 2000);

Basically it adds a blanket 2 seconds to the game loading, and we're trying to shave off seconds wherever we can, so want to make sure we're safe to remove this.

Thanks!

@natebluewizard
Copy link
Author

Hypothesis is that its the only way to show the bar when fully loaded... otherwise it shows @ ~90% then disappears as soon as the game is 100% (never actually showing the bar @ 100%)

@greggman
Copy link
Owner

This is copied from Unity so if it's not in Unity now that means they changed their default template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants