using UnityEngine; using UnityEngine.UI; using XCharts; [DisallowMultipleComponent] [ExecuteInEditMode] public class Demo_Test : MonoBehaviour { LineChart chart; void Awake() { chart = gameObject.GetComponent(); if (chart == null) { chart = gameObject.AddComponent(); } var buttom = transform.parent.gameObject.GetComponentInChildren