Unity Scripting Primer Part 3: Collisions and Triggers

Following on from Part 2, where we looked at the common Unity MonoBehaviour methods like Update() and OnEnable(), in Part 3 we will look at the MonoBehaviour methods that deal with physics collisions. These methods make common physics behaviours easy to manage. A few quick notes: In this article I will discuss the 2D versions … Read moreUnity Scripting Primer Part 3: Collisions and Triggers

Unity Scripting Primer Part 2: MonoBehaviour Basics

In Part 1 I covered public and serialized variables in Unity scripts. In Part 2 I will talk about MonoBehaviour methods. Unity scripts by default inherit MonoBehavior, and therefore implement many standard methods, which give great automatic functionality. When a script inherits MonoBehavior, it is declared like this: Inheritance is an important part of programming, so read up … Read moreUnity Scripting Primer Part 2: MonoBehaviour Basics

Unity Scripting Primer Part 1: Public and Serialized Variables

We’ve all asked for help online and been given a succinct answer that, while probably 100% accurate, wasn’t any help at all because the helper assumed we knew something we didn’t. So frustrating! In these posts I’ll cover the most simple, basic building blocks of Unity scripting without making too many assumptions, and I’ll be glad … Read moreUnity Scripting Primer Part 1: Public and Serialized Variables