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 Rush3fan · Jan 28, 2012 at 12:21 PM · freezeonoff

Everything in Unity starts and stops, starts and stops, on and on..

I thought it was all because I had a bunch of warnings in my error console, but I debugged everything with zero errors or anything, and this freezing keeps happening on and off repeatedly (always a consistent frequency, but different every time the error starts happening). This has also happened on my laptop when I did use it. Back then, I didn't have nearly as much code running.

The computer I use now is a beast and it's very hard to slow it down. All my hardware is very new and up to date and can run most games on highest graphics.. I'm running windows 7 64 bit. My laptop used vista 64-bit.

The only solution I have found is closing and reopening Unity. (same on my laptop)

I also have thee latest version running.

Any idea what this might be, or how I can solve it?

I have the pro version, so I can check the profiler, but I'm not even sure what to look for.

Ps: I have never seen this happen in a compiled project.

Comment
Add comment · Show 4
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 Tasarran · Jan 28, 2012 at 02:40 PM 0
Share

Without some more information, its impossible to tell what is causing this...

It's not unusual for scripting to cause the game to bog down... Unity updates many times a second, if you make the computer do something that takes more than say, 1/60th of a second, there will be some lag.

If you have a LOT of objects that have Update() functions on them, just the sheer pile of commands co$$anonymous$$g in all at one time can cause a problem.

Look up Co-Routines and the yield statement.

avatar image Rush3fan · Jan 28, 2012 at 05:05 PM 0
Share

So, your saying to optimize the code more? I have actually been coding for some time, and I can usually tell when there's something really inefficient happening in my code.

For instance, I designed this spark system that would create more sparks when there are more collisions. A funny thing happened where a spark would fly and trigger this chain reaction of more sparks, and in a moment, there were so many sparks (with scripts going) all at once, Unity completely bogged down and lost framerate. That was framerate, not this weird freeze on and off thing.

Now, I'm sorry I forgot to mention, but get this: This freeze on and off thing happens in editor even when my game isn't playing. It isn't like a loss of fps because I know what that looks like. There is something weird happening in the editor and nowhere else, at least not in my compiled projects.

I did look into the yield thing, and I'd like to try it out sometime. What I currently like doing is splitting a load in half using if(time%2==0)

avatar image rabbitfang · Jan 29, 2012 at 05:03 AM 0
Share

If it isn't happening while the game is running (in 'edit' mode), check the editor scripts (if you have any). I also sometimes run into this problem. I'm not sure what it is, but I think it might be a background process running.

avatar image Rush3fan · Jan 29, 2012 at 06:51 AM 0
Share

Ok thanks! Is there a way to see what editor scripts are running?

I think this might have to do with the playup pluggin I have installed. $$anonymous$$aybe, just maybe..

I'm going to have to look into this.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How to turn on a light by pressing and after few seconds turn it off 1 Answer

How to make a light turn on/off 1 Answer

UI Button ON/Off 3 Answers

How can i make my Timer script start and pause only when something certain is activated? 2 Answers

particle emitter on/off using the left mouse button 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