I believe this is a question more oriented to Unity’s dev team but feel free to correct me if I am wrong on my assumptions.
From the reference manual:
GUI.Button
static function Button (position : Rect, text : string) : bool
static function Button (position : Rect, image : Texture) : bool
static function Button (position : Rect, content : GUIContent) : bool
static function Button (position : Rect, text : string, style : GUIStyle) : bool
static function Button (position : Rect, image : Texture, style : GUIStyle) : bool
static function Button (position : Rect, content : GUIContent, style : GUIStyle) : bool
Why not a static function Button (position : Rect, style : GUIStyle) : bool
Right now I am trying to create buttons right out of textures - meaning no text from the GUI - and in order to use styles I have to do asomething like:GUI.RepeatButton (Rect (0,0,76,76), "", myStyle)
As a hack it works, but it’s not pretty
Do you guys also think that the polymorphism should contemplate the above?
Right now I would say no, because it would just refer to another object that I would not use (otherwise I would not be using GUIStyles in the first place).
You said you want to create buttons right out of textures with no strings from the UI, I took that as meaning you might want to show an icon or something graphic in there and you can do that via GUIContent (show something graphic). The skin and/or style would define the background image of the button, the GUIContent defines what content goes inside (text, image and/or tooltip).
Maybe it’s me that’s no understanding what you’re after?
Ahhh, in that case then you’re spot on above, using an empty quotes and a style is the way to go. Perhaps not the most elegant in all universes but the function requires a rect then something about what content you’ll show (string, image or GUIContent object) as it is today (and as you’ve already surmised).