What is a UnityEvent? A UnityEvent is Unity’s built-in event system which allows you to subscribe to events right in the editor. The Unity UI system commonly uses them for example when a button is pressed: How do I use a UnityEvent in my code? All you need to do, is create a public UnityEvent…… Continue reading Unity – UnityEvent
Category: Other/ Scripts
Anything that is not a project but may still be useful to talk about as well as being a place for single scripts which may have use in another project.
Unity – 2D Player Controller
What is this? This is a simple and easy to use 2D Player Controller. It is highly customisable and has easy integration with animations. It features a good set of parameters that can be tweaked within the Inspector as well as being able to hook up events for when the character is Idle, Moving, Jumping…… Continue reading Unity – 2D Player Controller
Unity – ‘Draggable UI’ Script
What is ‘Draggable UI’? Draggable UI is a super simple script. Simply, following on from the idea that I would love more control over my User Interface when playing video games, specifically within MMO’s. How? It makes use of Unity’s built-in Interfaces including ‘IDragHandler’ and ‘IEndDragHandler’. Implementing these interfaces allows the script to receive such…… Continue reading Unity – ‘Draggable UI’ Script
Programming Design Patterns – Singleton
Explanation The Singleton pattern in its simplest form ensures that there will only be a single instance of a specific class. This is a kind of alternative to a static class which also only allows a single instance of a class. Using the Singleton pattern also means that we are able to use its public…… Continue reading Programming Design Patterns – Singleton
Unity – SceneManager (LoadSceneAsync)
SceneManager The Unity SceneManager is a class introduced in Unity 5 to split up some of the functionality of the Application class. This includes helping to make loading (and unloading) scenes within Unity easier. The SceneManager lives within the UnityEngine.SceneManagement namespace and has a whole host of useful methods such as LoadSceneAsync and UnloadSceneAsync. These…… Continue reading Unity – SceneManager (LoadSceneAsync)