Just as with variables, we have to let Unity know about a method before we can use it. Depending on who you talk to, some will say, "We have to declare a method," others will say, "We have to define a method," or even, "We have to implement a method." Which is correct? In C#, it doesn't make any difference. Use whichever term helps you learn more easily. I like to say I'm defining a method's code block, nothing like declaring a simple variable on a one-line statement.
Defining a method the right way
The minimum requirements for defining a method
There are three minimum requirements for defining a method:
- The type of information, or data, that a method will return to the place from...