using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace MPStudio
{
    public class AddText : MonoBehaviour
    {
       // public Transform parent;
        
        private Text _text;
        protected virtual void Awake()
        {
            _text = GetComponent<Text>();
        }

        protected virtual void Start()
        {
         //   this.transform.SetParent((parent as Transform),false);
        }

        protected virtual void OnEnable()
        {
           
        }

        public void OnSpawn(object[] data)
        {
            string f = (string)data[0];
           UpdateUI(f);
        }

        public void UpdateUI(string textStr)
        {
            _text.text = textStr;
        }
    }

}