O'Reilly logo

Unity 3D Game Development by Example by Ryan Henson Creighton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

With great sandwich comes great responsibility

There are a few rules and "best practices" to follow when declaring functions.

  • Your function name should start with a capital letter.
  • You must never start a function with a number or some weirdo character like tilde (~) or you will get an error. An error is a written notice that Unity sends you when something you typed doesn't work or doesn't make sense.
  • You can press the Enter key to drop the top sandwich bun down a line. Some programmers (like me) prefer writing code this way so that they can see the open or closed sandwich buns lined up, but other programmers prefer code that doesn't spread out too much. In this book, we'll keep the top curly braces tightened up to the end of the function declaration. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required