| 123456789101112131415161718192021222324 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class DeviceView : MonoBehaviour
- {
- void Start()
- {
- Transform t = this.transform.Find("ScrollView/Viewport/Content");
- for (int i = 0; i < t.childCount; i++)
- {
- int k = i;
- t.GetChild(i).GetComponent<Button>().onClick.AddListener(delegate() {
- Debug.Log(k);
- });
- }
- }
- public void Back() {
- AudioMgr.ins.PlayBtn();
- Destroy(this.gameObject);
- }
- }
|