Interface Finder

Author: Ilya Suzdalnitski

Object.FindObjectsOfType is great, but it works only if a concrete type (inherited from Component) is given. What if we want to find objects that implement some interface?

It's possible to achieve the desired functionality using reflection. The solution makes a lookup table of types at initialization, and is almost as fast as Unity's FindObjectsOfType method.