using TMPro;
using UnityEngine;
public GameObject one;
public class Cards : MonoBehaviour
{
TMP_Text[] cardText = one.GetComponentsInChildren<TMP_Text>();
Debug.Log(TMP_Text.Length);
}
组件类型用TMP_Text搜索
using TMPro;
using UnityEngine;
public GameObject one;
public class Cards : MonoBehaviour
{
TMP_Text[] cardText = one.GetComponentsInChildren<TMP_Text>();
Debug.Log(TMP_Text.Length);
}
组件类型用TMP_Text搜索