Last update: Jan 26, 2018

I’ve been using Unity3D a lot these days for business and pleasure. I’ve been posting some of my code to gists on GitHub to serve as examples or as open-source components. I thought that I should collect them in one place to make the good stuff easier to browse. I intend to update this post occasionally to collect these as I make them. If you want something open-sourced, let me know here and I can add a license if there isn’t one already in the file.

Blog Posts

One-Liner singletons in Unity
(See also: updated version of the Services class from this post w/ more methods & unit tests.)

Making an in-game console in Unity, part 1

Making an in-game console in Unity, part 2

Utilities

Templates for creating C# plain classes, interfaces, and unit tests from the Editor

Unispawn (Multiple Unity Instance Spawner for OSX)

Script to install, run, and open logcat for a Unity Android App

Scripts

Multiline comment component for storing comments in the inspector

Component to spawn prefabs in a defined 2D area

Screen-relative anchoring component (Requires CameraFit.cs)

Optimized extension methods for picking random points on a Mesh. Barycentric coordinate wrapper for Vector3.

Sample Code

Example class to send events on a certain musical tempo

Shaders

Slightly more optimized simplex noise cg library (based off this one)

Water screen splash shader w/ time scrubbing in editor (modified from the one here)

Hacked version of Unity’s Additive Particle shader w/ a parameter to enable B&W rendering

Crappy perlin noise vertex shader

Unity 5 standard shader with fog disabled

Unity 5 standard shader hacked to support tinted, alpha-blended detail texture