Need The Transcript For This Lesson?
Need The Finished Scripts From This Lesson?
Need More Help?
Hard-Coding: To fix (data or parameters) in a program in such a way that it cannot be altered without modifying the program.
Local Variable: A variable that is declared within the body of a function. These variables can only be used within the function it was declared in. Because the variable is declared inside of the function, it technically doesn’t exist until the function is run. Then once the function has finished, the variable and it’s data is removed from the game’s memory, making them an efficient option for data that is only needed temporarily.
Global Variables: These variables are almost the opposite of local variables. These are declared within the main class of our scripts. Up until this lesson, most of the variables that we’ve declared have been Global variables. These variables – and the data within them – exist for as long as the script is active for in our scene/game. They’re good if you need to use the same data in multiple different functions.
This Lesson Is Part Of Many More From…