Have you ever found yourself wishing a built-in Unity class had some functionality that isn’t there? C# extension methods are the answer!
In this article, I’ll teach you how to use extension methods to add functionality to existing classes, no matter if they’re built-in Unity types, types defined in a third-party plugin, or even types defined in an Asset Store package which you could edit but you’re (rightly) worried about later package updates stomping your “patch”.
Seemingly obvious API omissions can be frustrating, but extension methods let you “fix” just about any API to your liking.
Hit the jump for all the details!