so I have created a public static class Extensions in my project. to which I have added quite successfully extensions to int, string, and float (for performing some parsing, and validation operations), and all of this works very well
by simply doing:
public static int SomeFunc(this int _int)
// do work on _int
return _int
}
So I figured that I could do the same thing to like GUI.Box (so that I can do some uniform scaling about a given point
by doing:
public static void Box(this GUI gui, Rect rect, GUIContent content, GUIStyle style, Vector2 _scale, Vector2 pivot){
Matrix4x4 backupMat = GUI.matrix;
GUIUtility.ScaleAroundPivot(_scale, pivot);
GUI.Box(rect, content, style);
GUI.matrix = backupMat;
}
but when I try to access this method I get the error message that “No overload for method ‘Box’ takes ‘5’ arguments”
so the question is how would I go about adding additional overloads to like GUI.Box(), or for that instance other static GUI methods as well (I can kind of guess that I would see the same issues with the other ones as well)?
additionally is there like an enumeration I can case/switch on so I don’t need a pivot vector2?