Download from Asset Store
This (free) extension library contains a few light-weight utility classes and convenient extension methods for some Unity classes.
The library contains:
- A base class for creating Singletons from any MonoBehaviour. See Singleton.
- A light-weight state machine class. See StateMachine.
- A monobehaviour class that defines generic methods for Instantiation. See GLMonoBehaviour.
- A light-weight clock class that can be used to manage timed events.
- A class for detecting when a value changed.See ObservedValue.
- Classes that represent piece-wise linear curves, called response curves. Extensions provide response curves for float, Vector2, Vector3, Vector4, and Color.
- Generators, useful building blocks for algorithms that should produce sequences of objects.
- A PlayerPrefs alternative that, in addition to the methods of the standard PlayerPrefs, also defines methods for dealing with boolean types, and rays of int, float, string and bool. See GLPlayerPrefs.
- A ObservedValue class for subscribing to changes to a variables value.
- Extensions for transform that allows easy setting of components of position, scale and rotation separately. See TransformExtensions.
- Extensions for vectors to calculate the projection and rejection, and the vector perpendicular (2D). See VectorExtensions.
- Extensions for Colors to get lighter or darker colors, get a color with a given value, and get an opaque version of a given color. See ColorExtensions.
From our blog
- The new class in Extensions, ObservedValue: what is it for and how to use it
- New generators: designed from scratch for use in procedural content
- Introducing Generators (These early generators have been replaced by the ones above).
- Introducing Response Curve
We used these classes in all of our 30 Games from our 30 Games in 30 Days project.