Four big "bugs" I have discovered while working with Unity

  1. Your input scripts will not work when the game is running, if you are in scene view.

  2. No matter how good your script is, it will not work if you forget to attach it to the object

  3. similar to above… perhaps you forgot to assign it in the inspector? is actually in the error console message now because of how often this “bug” occurs.

  4. changing settings on a locked inspector panel will not change the settings on the object you have selected in your heirarchy, unless it is the same object as the one you locked.

the first one, I actually discovered about two weeks ago. Took me about an hour to figure out my scripts weren’t working because I was switching over to the scene window upon every start of the game. I was goign crazy, even hot key combos I had scripted, weren’t working. I even wrote a test hotkey script, and started to panic when that did not pick up input.getkeydown(keycode).

2 Likes

It’s all fun and games until you start to discover the real game breaking unity bugs :slight_smile: like the bug with nested reflections probe

LOL. Great post. I spent a good 5 minutes on issue #2 yesterday, wondering why the hell my collision detection script wasn’t firing. Turns out it was not attached to the colliding object :slight_smile:

1 Like

I know about #1 and actually have never had that issue(I’m aware of what I’m doing). However, I’ve been victimized by #2 VERY frequently :slight_smile: #3 some(less than #2), and #4 a couple times. I find these glitches interesting though. It is just like code doing the wrong thing despite it doing exactly what you tell it to.

1 Like

Don’t forget a rookie mistake, like editing scene for an hour and then realizing you are editing in play mode.

4 Likes

:slight_smile: you can save the situation by copying the game objects before pressing stop :slight_smile:

1 Like

But you realize these are on purpose. Input doesn’t work in scene view since you need to use the keys to navigate. Scripts need to be on gameObjects so it knows which objects you want them to apply to.

https://www.youtube.com/watch?v=xECUrlnXCqk

2 Likes