NewN_UAVPlane/Assets/Zion/Scripts/Adam/Components/DeviceBtnItem.cs

34 lines
663 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DeviceBtnItem : MonoBehaviour
{
public Button selfBtn;
public string id;
public string selfName;
public Text selfText;
// Start is called before the first frame update
void Start()
{
selfBtn = GetComponent<Button>();
selfText = transform.GetComponentInChildren<Text>();
}
// Update is called once per frame
void Update()
{
}
public void SetInfo(string _id, string _selfName)
{
id = _id;
selfName = _selfName;
selfText.text = _selfName;
}
}