I want to create a GUI button with a .png image I imported to my game assets folder. It is 100x30.
asked Nov 21 '10 at 06:09 AM
If you're using OnGUI for this, you can either make a direct texture reference in your script, and use that value in the GUI.Button command:
Or, you need to create a custom GUI Style, to use with it, and drag your imported png texture into the appropriate "background" slots in the Style's inspector properties (eg, under the "Normal", "Hover" and "Active" slots). Then use that Style for the button:
answered Nov 21 '10 at 07:37 AM