Hunting for gamecrashing bug, does disabling game objects and scripts mean they don't affect the game anymore?

I’ve got a scene I’ve been working on for a few weeks, and it’s been working fine the whole time. Today I added a health bar GUITexture and a script that corelates the health bar to the unit’s current health… pretty straightforward. Ever since I added it, my game runs for about 2 mins, during which time the CPU fans slowly get louder and louder, and eventually the game crashes.

I’ve tried turning off the health bar object, disabling the script, even going into the script and commenting out the whole thing. When that didn’t get rid of the issue, I tried disabling every object in my scene except for the main camera, but the same thing keeps happening. After I close Unity, the CPU fans go back to a quiet speed, and it’s not until I open Unity and then run the game for a few minutes that the crash happens.

With a complex scene I’ve spent so much time working on, I hate to scrap it and start over on a new scene. Anybody have any tips?

I’m usually a pretty firm believer in writing one’s own code, and today I realized why. The thing that was causing all this mischief for me was a script I copy/pasted from an official Unity sample page regarding how to make a GUITexture follow a Game Object around the screen (as a health bar might be expected to do in an RTS). When I deleted Unity’s version and wrote my own (albeit pretty similar) version, viola, no crashing, and the game is back up to 80 fps. Lesson learned, folks.