- Home /
Unity stops working when I play the game in editor
Hi
This happened not so long ago... I was importing audio files into my Unity project, just to realise that the files weren't either MP3 or OGG. I removed them from assets and converted them to MP3, then I imported them into the project again (this time as MP3). I had a script that was working pretty well, and that script was supposed to use the audio files. Then I selected the audio files in the inspector. This far everything seemed normal untill I started the game. The game ran for a while until I used an input command in the script that would activate the sound. Unity stopped working and I had to manually close the proces. I opened Unity again and saw a message in the debug log saying something similar to "FILENAME.m4a has been deleted because it has crashed". I didn't care too much about the message, because I had already deleted the M4A audio files. Now when I try to use the script (activating MP3 AudioClips) or try to run the game for more than 10 seconds Unity crashes. Is there a possibility that the files became corrupt? Or is there an other explenation to this? I would also like to have an answer on how to solve this problem as well. So if you have any knowledge of this, then you are welocme to leave an answer or a comment.
This is really weird... it only crashes when I press the R button. The R button is only used to toggle a bool.
Answer by MOLB · Jun 20, 2012 at 04:28 PM
It turned out to be a script that had some problems, I rewrote the script and now everything works. Thanks for the help anyway!
Answer by Jason_DB · Jun 20, 2012 at 03:57 PM
If you suspect that something could be corrupted, try exporting all the assets out as a package and reimporting them into a new project. That's worked for me the couple times I've gotten a corrupted project.
I was thinking about that as well, but now I found out was the source of the problem is. When I activate a ParticleEmitter then Unity crashes. Everything else seems to work...
Just a standard particle emitter? that seems very strange... I'm pretty sure I've only every crashed Unity by making an infinite loop or running out of memory. Is it a very intensive effect or something?
Your answer
Follow this Question
Related Questions
How to use option setting Vibrate and Mute 1 Answer
Unity crashes because of script 2 Answers
What can cause Unity to crash? 3 Answers
A node in a childnode? 1 Answer
Active/Desactive Cameras 1 Answer