Variable (value type) |
There are two kinds of types in C#: value types and reference types. Variables of value types directly contain their data. With value types, the variables each have their own copy of the data, and it is not possible for operations on one to affect the other (except in the case of ref and out parameter variables). C#’s value types are further divided into simple types (e.g. float ,int ,bool ), enum types, struct types, and nullable value types. |
Variable (reference type) |
Reference types store references to their data, the latter being known as objects. With reference types, it is possible for two variables to reference the same object and thus possible for operations on one variable to affect the object referenced by the other variable. C#’s reference types are further divided into class types (e.g. object , string , class ), interface types, array types, and delegate types. |
Method |
A method is a code block that contains a series of statements. A program causes the statements to be executed by calling the method and specifying any required method arguments. |
Inheritance |
Allows you to define a child class that reuses (inherits), extends, or modifies the behavior of a parent class. The class whose members are inherited is called the base class. The class that inherits the members of the base class is called the derived class. Microsoft. |
Namespace |
Help to prevent naming conflicts by organizing our class names into collections referred to using the chosen prefix. An example of this simplified access: instead of typing UnityEngine.Debug.Log() we can type Debug.Log() by writing using UnityEngine . |
Scope |
A variable can be either of global or local scope. A global variable is a variable declared in the main body of the source code, outside all functions, while a local variable is one declared within the body of a function or a block. Wikipedia. |
Scriptable objects |
Scriptable objects are reusable data containers defined via C# script and saved as Assets. They reduce memory usage by storing references to a single instance of a data set. Because they inherit from ScriptableObject class they cannot be attached to GameObjects as they do not inherit from MonoBehaviour. |
Operators |
Operator symbols represent the arithmetic, assignment, relational, and logical functionality that types can perform. Arithmetic operators (+, -, *, /, % ) represent basic math functions, while assignment operators (=, +=, -=, ... ) perform math and assignment functions together on a given value. Relational (==, >, <, >=, <=, != ) and logical (&&, ||, ! ) operators evaluate conditions between multiple values, such as greater than, less than, and equal to. Read more about C# operators. |