Tanoda
DropDownListButton.cs
Go to the documentation of this file.
1
3
5{
6 [RequireComponent(typeof(RectTransform), typeof(Button))]
7 public class DropDownListButton
8 {
9 public RectTransform rectTransform;
10 public Button btn;
11 public Text txt;
12 public Image btnImg;
13 public Image img;
14 public GameObject gameobject;
15
16 public DropDownListButton(GameObject btnObj)
17 {
18 gameobject = btnObj;
19 rectTransform = btnObj.GetComponent<RectTransform>();
20 btnImg = btnObj.GetComponent<Image>();
21 btn = btnObj.GetComponent<Button>();
22 txt = rectTransform.Find("Text").GetComponent<Text>();
23 img = rectTransform.Find("Image").GetComponent<Image>();
24 }
25 }
26}
UnityEngine.UI.Button Button
Definition: Pointer.cs:7
System.Drawing.Image Image
Definition: TestScript.cs:37
Credit Erdener Gonenc - @PixelEnvision.