tesh – Unity2

Shorthand for If-Else, structured as { condition ? “If Outcome” : “Else Outcome” }
Allows for simultaneous updating of a variable by having it associated with a class, or method without requiring or allowing separate instantiations
Allows for multiple methods with the same name so long as they have different parameter lists. Useful for consolidating methods that act similarly but take in different data types or structures.
Uses a generic variable to obtain type information for a method where you are unsure what type of data you will receive. The types can be constrained with class names, “struct” to ensure value types, “class” to ensure it is a reference type, or “new()” to ensure it has its own valid constructor.
Class B inherits from Parent Class A, meaning Class B has access to any public features from Class A. Class B is always an iteration of Class A.
Using Inheritance, you can allow child classes to have multiple types. You can also “upcast” a child class as a parent to treat it as a parent class by initializing a new child class as a parent class. To treat it as a child class again, you must “downcast” it again as shown here on line 12.
Reverse of Overriding. using the “new” command, you can force child classes that are upcast to their parent classes to use the parent’s version of a method if the method has the same name as a child class method.
Allows children to have variations of a parent’s methods, or even additions to the parent’s methods. Upcast children calling overriden methods will have access to the child’s version of the method rather than the parent, and can also call the parent’s version of a method by prefacing it with “base.”
Interfaces are similar to children of a parent but when classes implement Interface A, it allows functionality from Interface A to be shared among many unrelated classes (B). While you can only inherit from one class at a time, there is no such limit on interfacing with multiple classes.
Allows you to add functionality to methods for which you can’t edit source code or derive a child from.
Allows you to use classes among different scripts. Is seen in the “using UnityEngine;” and “using System.Collections;” lines that are at the head of most unity scripts.

Allows you to evaluate and run incrementing code without using the update function or timers for better efficiency.
Allows you to store and update rotational values without them succumbing to Gimbal Lock the way Euler Angles do.
Delegates are containers for functions that are treated the way variables are for data.

Events are delegates that act as broadcast systems to alert subscribed methods to be called when the event occurs.