70

I spend over 3 hours thinking why my code doesn't work. It turns out you need to attach the code to the game object. Who would have known...........

Comments
  • 4
    println("Welcome to devRant.\n");

    println("Well, you now know it, right? Congrats then. Experience is important.\n");
  • 0
    Anyone who would have spent about a minute on Google would have known
  • 2
    @CozyPlanes I was being sarcastic. Of course I know that you need to attach code to the game object. I just somehow didn't notice I haven't done so :D
  • 3
    If you're like me you probably tried deleting some code, debug.log(); , restarting unity, deleting the object and then finding out you didn't attach the script
  • 1
    @byIcee pretty much :P
  • 3
    How about 4 hours trying to fix code. Code is on a game object. But the small checkbox at the top is unchecked.
  • 3
    Tip: create -> attach -> write.
  • 0
    @CozyPlanes why does println need an extra new line?
  • 1
  • 0
    @nerd-san I also hate that :D
Add Comment