- Home /
Every time i hit play Unity crashes
I have lost hours of work at this point to this issue and i don't know why. I'm using the latest version of unity with every package up to date and i still lose all my work to this unfix-able bug. At this point i'm constantly saving after every edit i do and making sure I have backups, but I cant play my game because if i try all that work is gone. Which means that backing up and saving, as well as UNITY ITSELF, is flat out useless.
Answer by dacarrera · Nov 11, 2019 at 04:22 AM
There could be lots of things at play here. More information could help pinpoint a cause.
When did the crashing start happening? If you're doing 'big bang' programming this could be hard to know (i.e. not testing often and adding a lot of new code/functionality at a time).
How are you certain this is a Unity bug? If you've ruled out self-error, then you'd have to switch to a different version of Unity and try again (though I'm not aware of this kind of development-breaking bug atm).
Without more information, the most likely culprit is likely an infinite loop. Do you have anything in an Update() call or like a while loop that could be looping forever? The best place to start looking is in your Start(), Awake(), and Update() methods as this is where everything is kicking off especially if the crash happens right away. Start editing out method calls, adding in Debug.Log() lines anywhere you're suspicious and try to pinpoint a cause.
Dealing with crashing is super frustrating and can be very time consuming. I'd start with a bottom-up approach (lots of commenting out, and slowly adding things back until you find the crash) as opposed to working down (unless you already have some suspicions of the cause).
Good luck, and if you still have issues please add some more details with what you find and I'm sure you can reach a resolution!
Hey @dacarrera! Thanks for your response. I found out that I put a for loop in my update, therefore causing the problems in play. Thanks again!
Your answer
Follow this Question
Related Questions
CRASH when building for web 0 Answers
On exiting application My SAMSUNG TAB sph-p100 crashes 0 Answers
Rift DK2 integration issues with keyboard 0 Answers
Unity stops responding when i ask it to execute the same function for the third time 1 Answer
Android build issues with latest Google play services (9.2) and Google analytics 0 Answers