Encapsulation is one of the most pivotal aspects of coding. In a nutshell it is the ability for classes to keep parts or all of themselves private unchanged from the outside. However sometimes these private variables must be changed from the outside but otherwise...
Namespaces are collections of libraries of code that allow extra functionality in your project. Unity comes with three default System.Collections and System.Collections.Generic and then UnityEngine. There are variety of different namespaces provided by Unity such as...
Much like arrays, Lists are used to group collections of variables and objects. Unlike arrays which are static once created and can only be changed by creating a new array and copying over the values. By contrast lists allow you to dynamically add and remove values on...
Mind Enuming: Enums in Unity Have you ever wished you could just use some standard language to represent your values? Well now you can with Enums. In C# these are primitive data types using regular language to represent a constant. They’re basically ints with added...
More complex games usually means more complex methods of organization. Dictionaries help you make sense of the chaos by mapping a key (like a string) to a value pair (for example an int) and then giving you a fast way to look it up. Like in example above use an Item...
It’s An Abstract Kind Of Interface: Abstract Classes and Interfaces Taking advantage of C#’s more advanced features will begin to make more sense from a organizational perspective as you begin looking to make classes more compact and efficient, extracting more and...