I'm trying to make a button wrapper class that easily allows for mouseover detection. I it working for regular GUI.Buttons, but now I'd like to make it compatible with GUILayout.Buttons, as well. The problem is that I don't have direct access to the Rect of a GUILayout.Button.
I understand that I can use GUILayoutUtility.GetLastRect to get the last drawn rectangle, but doesn't this mean that I can only do one button at a time? I don't understand how I would go about referencing the rects of multiple buttons this way.