Unity Community


Results 1 to 7 of 7

Thread: GUIstyle


  1. Location
    NA
    Posts
    628

    GUIstyle

    i understand GUIskin but not GUIstyle.
    Where can i see some example script with this?
    I want to create custom buttons, that is it.

    I checked out this movie file but screen size it is too small to see it.
    http://vimeo.com/channels/ncsuunity#6067691

    thanks,
    fundi
    Fundi


  2. Location
    The sunken city of R'lyeh
    Posts
    2,061
    They are quite simple to work with. Simply define it as you would any other variable you expose for the inspector.

    Code:  
    1. var myButtonStyle : GUIStyle;

    Change the attributes as you wish for you new button in the inspector, then reference that style for your button in code where applicable.

    Code:  
    1. GUILayout.Button("Press: ", myButtonStyle );


  3. Location
    NA
    Posts
    628
    sorry for my stupid question but how to you define the placement of the button than?
    Fundi


  4. Location
    The sunken city of R'lyeh
    Posts
    2,061
    Quote Originally Posted by lesfundi
    sorry for my stupid question but how to you define the placement of the button than?
    Defining the placement of a button isn't quite connected to a GUIStyle definition. If you're looking for information at that basic of a level then check out the following video.

    http://unity3d.com/support/resources...-gui-made-easy

    Then move on to the documentation.

    http://unity3d.com/support/documenta...g%20Guide.html


  5. Location
    NA
    Posts
    628
    Fundi


  6. Posts
    38
    I found this thread helpful but the first video link in the above post is outdated and was not easy to track down. Here it is for anyone else looking for it:

    http://video.unity3d.com/video/32727...-game-gui-made


  7. Location
    Toronto, Canada
    Posts
    59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •