using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using TMPro;
    
    public class SpriteText : MonoBehaviour
    {
        [SerializeField]
        GameObject selectPlane;
    
        TestScript testScript;
        TextMeshProUGUI text; 
    
        // Start is called before the first frame update
        void Start()
        {
            testScript = selectPlane.GetComponent<TestScript>();
            text = gameObject.GetComponent<TextMeshProUGUI>();
        }
    
        // Update is called once per frame
        void Update()
        {
        
        }
    
        void FixedUpdate()
        {
            text.text = testScript.sText;
        }
    }