when the script is 'compiled' it gives me the following error:
when i add a style to the BeginVertical constructor, like this:
the error goes away...
in the script reference guide, it is said that the style is an optional argument
why do i have to explictly provide the style argument for it to work?
i'm using Unity 3.1.0f3 (54715) if that can help
Thanks a lot
NB: i'm building a unity GUI generation framework so it's not just me not wanting to provide the "style" argument. The thing is: the framework isn't supposed to generate this argument when the user didn't supply a style attribute for a BeginVertical element
asked Mar 15 '11 at 10:11 PM
According to the script reference, it's not optional:
The one in question being the last one, which takes a GUIContent, a style, and a variable number of GUILayoutOptions
answered Mar 15 '11 at 10:26 PM
Thanks a lot for your help Mike, but it didn't really answer my question. As explained in my previous comment, the script reference guide says about the 'style' argument:
and when i use the text/style/options constructor, like this:
it works! i don't have to provide the style argument for it to work!
why is there such a discrepancy between the two constructors?
answered Mar 16 '11 at 09:36 AM