using System.Collections; using System.Collections.Generic; using TMPro; using Unity.VisualScripting; using UnityEngine; using UnityEngine.UI; public class UI_TopTipPanel : BasePanel { public void Init(string title, string content) { GetControl("Text_Title").text = title; GetControl("Text_Content").text = content; GetControl("Text_Content").GetComponent().SetLayoutVertical(); var height = GetControl("Text_Content").rectTransform.sizeDelta.y + 60 + 40; GetControl("Image_BackGround").rectTransform.sizeDelta = new Vector2(640 , height); } }