UpdatePump

Author: Brandon Edmark

Description
This is a MonoBehaviour that allows non-MonoBehaviour objects to hook into Unity's Update, FixedUpdate, and LateUpdate loops. It is useful if you have objects outside the Unity MonoBehaviour/GameObject system that need to update like MonoBehaviours can. It can also be used to boost performance vs Unity's automatic Update calls if there are hundreds of MonoBehaviours updating in a scene.

Usage
Call UpdatePump.Register, inputting the name of the method you want to run and the type of Update you want to run it on. The update type, fittingly, is specified by the UpdateType enum. The method must have no parameters and must return void.

As an UpdatePump is just a MonoBehaviour, you can use its "enabled" property to pause updating of all the objects registered to it.