Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

buttons - GUI - C#

$
0
0
Hello,

In the past small projects I have created to learn Unity, I have used GUIstyle for buttons, importing sprites manually to the GUIstyle through the inspector with the script below. I would love to do this in a better way for example being able to use my sprite sheets, instead of having to import sprites 1 by 1 image/sprite into unity and then add them in the inspector.
Code (CSharp):
  1. public GUIStyle btn1;
  2.     void OnGUI () {
  3.  
  4.         if(GUI.Button(new Rect(554,350,258,33), "",btn1)) {...
buttons - GUI - C#

Viewing all articles
Browse latest Browse all 1466670

Trending Articles