What is it?
Extension methods enable you to add methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type. An extension method is a special kind of static method, but they are called as if they were instance methods on the extended type. In the GitHub project you’ll find a number of extension methods that I’ve found useful over the years. I’ve listed a sample below. For more information on extension methods, see the c# Programming Guide.
Easily set certain variables on an a Gameobject and all children objects recursively:
Get Components on objects that have specific tag:
Get specified interface attached to GameObject:
Easily shuffle a list and return a random value from list.
Remaps a number from one range to another.
Thank you for reading 🙂