Game Development Reference
Fig 1.28 The Unity error message displayed when a semicolon is missing from a line of code.
There are two main types of operators in programming: arithmetic operators
perform mathematical operations between variables and values and relational
operators compare variables and values.
Basic math operators are shown in Table 1.2 .
The assignment operator you may be more familiar with as an equal sign and
the multiplication and division operators are a little different to those used in
are placed into variables using the assignment operator. To use values already
stored in a variable you simply refer to them in the equations using their
name. It is exactly the same as high school algebra. More complex equations
can also be created, such as
x = (y + z) / 3 + 8;
where parentheses work for order of precedence as they do in traditional
algebra (e.g., the y + z between the parentheses would be calculated first).