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 Chesley · Aug 21, 2012 at 01:11 PM · forcequit

force quitting

i sometimes find myself in a situation where everything freezes because i forgot to code something to make a certain loop stop, result ing in sometimes spawning billions of objects accidentally.

the only way out is to force quit.

can this have dramatic effects on files, textures, scripts, materials, models, ect?

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 ragnaros100 · Aug 21, 2012 at 01:14 PM 0
Share

Im not entirely sure, but I dont think so. when you accidentally do the loop, you're in-game, right?

avatar image Chesley · Aug 21, 2012 at 01:28 PM 0
Share

yes I'm in game

avatar image ragnaros100 · Aug 21, 2012 at 01:30 PM 0
Share

Well.. I've done it before while working on a respawn system... It didnt destroy/damage any of my files :) I would avoid it though :)

avatar image Chesley · Aug 21, 2012 at 01:33 PM 0
Share

thank you! I've done it many times, so i don't think it can damage anything, and I'm sure it didn't damage anything now. i am going to avoid it using this simple script (ill post below) i made using the Debug.Break i got to know from UFO Hunter

2 Replies

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

Answer by code-blep · Aug 21, 2012 at 01:15 PM

This post may help you Cheesley.

http://answers.unity3d.com/questions/26670/can-i-force-game-execution-to-stop-in-the-editor.html

Comment
Add comment · Show 2 · 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
avatar image Chesley · Aug 21, 2012 at 01:18 PM 0
Share

thank you, but since i already force quit a few times, can that still have effects on files?

avatar image code-blep · Aug 21, 2012 at 01:44 PM 0
Share

I have had to force quit a few times of late. As yet I personally have not experienced any issues doing this. That said though it's not great for any application to be closed that way.

Regular backups of the entire project is the key if you keep experiencing problems that require you to kill an application.

avatar image
1

Answer by Chesley · Aug 21, 2012 at 01:34 PM

the script i now use to avoid this:

 function Update() {
     var fps = 1.0f / Time.deltaTime;
     if(fps < 5) {
         Debug.Break();
     }
 }
Comment
Add comment · Show 2 · 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
avatar image code-blep · Aug 21, 2012 at 01:45 PM 0
Share

Nice. I might add that to my list of handy code. Is it tried and tested? I only ask is that if Unity is running V slow and maybe unresponsive, does this script really work. I demand you go break you project to test ;)

avatar image Chesley · Aug 23, 2012 at 07:02 PM 0
Share

sorry just saw you commented (little late), yes i tested it, but i should change the 5 to a 2 or a 1 since it then only pauses on major cpu spikes ins$$anonymous$$d of regular pauses

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

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

Unity Quits Because Of Script!!! 1 Answer

Explosion Force not working : Unity3d 1 Answer

How to quit game within gameplay and directs to main menu ? unity iPhone 2 Answers

Unity keeps force quitting on Mac no matter how small my action is? 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