Unity Reverie

Meditations, experiences and visions of code

Category / Unity

January 31, 2014

Unity Extension Methods

You’ve probably already seen plenty of articles, threads, snippets and Gists about this very topic, such as this one in particular. Therefore I won’t bore you with how these work or try recycling commonly-used methods posted elsewhere. I personally do not find a lot of them that useful, especially as optimizations, such as setting single …

Read More
November 1, 2013

A Strange Camera System in Unity: Part II

Character Demo Controls

The final piece of the camera system is comprised of the Unity-specific behavior, or all lifetime methods within the MonoBehaviour pipeline. The first part of the system described separating out concerns of our business logic from that which diverges the often chaotic View out on its own. In the end, we will end up with …

Read More
October 27, 2013

A Strange Camera System in Unity: Part I

Waypoint Flythrough

While prototyping out a recent project, I found it quite easy to make an interesting, dynamic camera with StrangeIoC serving as the backbone. Once setting up the necessary bindings and creating unique Signals that will be dispatched throughout, certain stateful information and a View to perform Unity-specific Camera operations can be achieved with ease. I’ve …

Read More
September 27, 2013

Getting Strange with Unit Testing in Unity

Unit Testing in Strange

Unity scripting can become cumbersome at times without a clear-cut discipline, organization, or framework. Being a component-based design, attaching/detaching or enabling/disabling script “components” on a GameObject which must inherit from a MonoBehavior can get rather clunky with added complexity. Oftentimes we wish to introduce business logic or maintain state without caring about UnityEngine dependencies, and …

Read More
October 12, 2012

Ani.Mate Conversion to C#

Digital City

Animation tweening libraries are in full force on the Unity Store. The most popular of which, iTween, has plenty of niceties in it including Editor tools, but is far too clunky for mobile device usage. The main reason behind this is that each tween is created with Instantiate and finished with Destroy; extrapolate this X …

Read More