So, I've been making a Unity game, and there's been some weird behaviour that's been happening for a while.
My game runs fine. After loading, I get good performance, and can play the game no problem. It all works.
Except that very occasionally (about 1/5 times I run the game), at some point during execution (usually about 6 minutes in, but not exclusively), the game freezes. Everything on screen stops moving, and all audio sources continue to play a short section on loop (giving an effect like a stuck record). Sometimes this resolves itself after a few seconds, but most of the time it requires Unity to be shut down. This occurs in both the final build and the editor. If it occurs in the editor, no error messages appear, but the editor interface stops working, requiring the editor to be shut down manually.
I don't think there can be anything with my code that causes such an error, especially since it occurs at such radically different points during the game, but I was wondering if anyone else had experienced this, and if so, what they did about it. If no-one has experienced it, then it most likely is something wrong with my code, and I should have a look at it.
↧