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
0
Question by kaka24fan · Aug 20, 2014 at 07:52 PM · editorbuildscene-loadingloadlevelslow

(SOLVED)LoadLevel takes 3s in editor and 30s (!) after build.

PROBLEM SOLVED :) I forgot that during the floor generation I was outputting many, many things to Debug.Log. Deleting lines of script responsible for this solved the issue.

Hello!

All of my transitions from one scene to another work ok, with one exception. When I use LoadLevel(string) to load my main game scene and I try to play the game in Unity Editor, the scene loads in about 3 seconds. But when I build the game and then try to play the built version (on Win7) loading that scene takes up to half a minute.

Probably the most complicated thing that happens in the Start() functions of objects that are in that scene is generating a floor made of rooms. The algorithm is simple and back when I did it in C++ Allegro 5 it took less than a second.

I'm not sure what takes it as much time as the 3 seconds that I have to wait in the Editor, but I'm even more baffled by the fact that it takes that long (~30s) in the built version. What's wrongwith this?

The game is made just for training (I'm still learning the basics) so I can share any parts of the code with you. Just tell me, what you want to know.

Thanks for helping me!

Best Regards,

kaka24fan

Comment
Add comment · Show 3
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 christoph_r · Aug 20, 2014 at 08:03 PM 0
Share

This is most likely because you've been working on the scene while playing in the editor, so a decent chunk of it has already been pre-loaded. When you load the level in the build, however, all data needs to be re-loaded.

avatar image kaka24fan · Aug 20, 2014 at 08:59 PM 1
Share

Never$$anonymous$$d, I solved the problem, but thanks for your effort. I'll remember what you said, maybe it'll come in handy in the future :)

avatar image christoph_r · Aug 20, 2014 at 09:06 PM 1
Share

Good to hear you found the solution by yourself! It's really hard to believe how much debug logging can slow down the game.

0 Replies

· Add your reply
  • Sort: 

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

22 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

Related Questions

Distribute terrain in zones 3 Answers

Why is my build running so slow despite running fine in editor? 2 Answers

Game runs normal on editor, but it's slow on build 1 Answer

How can I build my game in Android Device? some Sprites are not rendering..,Is there something can I do to render this game in android build? 0 Answers

Build extremely slow 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