Download - Overview Functions

Transcript

Functions/Methods A function is just like a variable except it contains code instead data. It helps to make the code look clean by just writing the name of function instead of writing the whole code again. A function is a code block. The code block begins and ends with curly braces. Once the method is declared/define, it can be executed by calling just its name. The second reason for using methods in a script is to provide behavior to a GameObject by working with the variables.

Top Related