using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class LayerBtn : MonoBehaviour { public Image sprite; public Text nameText; public Text numText; public Button btn; public VerticalLayoutGroup secContent; // Start is called before the first frame update void Start() { } public void SetLayerBtnData(Sprite sp,string name,string num) { sprite.sprite = sp; nameText.text = name; numText.text = num.ToString(); } public void SetUseful(bool use) { btn.GetComponent().alpha = use ? 1 : 0.5f; } // Update is called once per frame void Update() { } }