When you code in C#, you need to tell the system to execute your instructions (e.g., print information) using statements. A statement is literally an order or something that you ask the system to do. For example, in the next line of code, the statement will tell Unity to print a message in the Console window:
print (“Hello Word”);
When writing statements, you will need to follow several rules, including the following:
Note that several statements can be added on the same line, as long as they are separated by a semi-colon.
a = b;
print (“hello stranger!”);
print (“today, we will learn about scripting”);
As we have seen earlier, a statement usually employs or starts with a keyword (i.e., a word that the computer knows).Each of these keywords has a specific purpose, and common keywords, at this stage, could be used for the following actions:Exiting a function: the keyword is return.
You can drag and drop the file called Statements to an empty object and play your scene; You can also modify it if you wish to try other statements.