Search Unity

access to the textures within GUIStyles?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Jessy, Jul 30, 2008.

  1. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    I would like to do something like what can be found on the bottom of this page:

    http://unity3d.com/support/documentation/ScriptReference/GUI.Label.html

    That is, I want to create GUI elements that use the dimensions of images I import. Is there some way to grab the images from a GUIStyle? Say, make the dimensions of a button's Hover state match the dimensions of the image I drag onto it in the inspector?

    And if so, where can I look up how to access this kind of property?
     
  2. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325