A bunch of helper functions for Unity.