Code understanding.

Float, this is used in code for a decimal number.

Example: float ‘name’  = ‘number’

Int, this is used for whole numbers

Example: int ‘name’ = ‘number’

bool, this is used for a true or false option. (If factor)

Example: bool ‘name’ = ‘true or false’

string, this is used to write a number sequence in code.

string ‘name’= ‘text’

Public allows the variables to be edited from anywhere such as unity, unity knows what sort of change each int, bool or float can be changed restricting it to either decimal numbers or whole numbers or text. with bool, they make it a tick box for true or false


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s